Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(537)

Side by Side Diff: chrome/browser/ui/webui/print_preview/print_preview_handler.cc

Issue 2792573002: Remove base::Value::CreateNullValue (Closed)
Patch Set: Rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/print_preview/print_preview_handler.h" 5 #include "chrome/browser/ui/webui/print_preview/print_preview_handler.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 web_ui()->CallJavascriptFunctionUnsafe("updateWithPrinterCapabilities", 1304 web_ui()->CallJavascriptFunctionUnsafe("updateWithPrinterCapabilities",
1305 *settings_info); 1305 *settings_info);
1306 } 1306 }
1307 1307
1308 void PrintPreviewHandler::SendPrinterSetup( 1308 void PrintPreviewHandler::SendPrinterSetup(
1309 const std::string& callback_id, 1309 const std::string& callback_id,
1310 const std::string& printer_name, 1310 const std::string& printer_name,
1311 std::unique_ptr<base::DictionaryValue> destination_info) { 1311 std::unique_ptr<base::DictionaryValue> destination_info) {
1312 auto response = base::MakeUnique<base::DictionaryValue>(); 1312 auto response = base::MakeUnique<base::DictionaryValue>();
1313 bool success = true; 1313 bool success = true;
1314 auto caps_value = base::Value::CreateNullValue(); 1314 auto caps_value = base::MakeUnique<base::Value>();
1315 auto caps = base::MakeUnique<base::DictionaryValue>(); 1315 auto caps = base::MakeUnique<base::DictionaryValue>();
1316 if (destination_info && 1316 if (destination_info &&
1317 destination_info->Remove(printing::kPrinterCapabilities, &caps_value) && 1317 destination_info->Remove(printing::kPrinterCapabilities, &caps_value) &&
1318 caps_value->IsType(base::Value::Type::DICTIONARY)) { 1318 caps_value->IsType(base::Value::Type::DICTIONARY)) {
1319 caps = base::DictionaryValue::From(std::move(caps_value)); 1319 caps = base::DictionaryValue::From(std::move(caps_value));
1320 } else { 1320 } else {
1321 LOG(WARNING) << "Printer setup failed"; 1321 LOG(WARNING) << "Printer setup failed";
1322 success = false; 1322 success = false;
1323 } 1323 }
1324 1324
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
1794 1794
1795 void PrintPreviewHandler::UnregisterForGaiaCookieChanges() { 1795 void PrintPreviewHandler::UnregisterForGaiaCookieChanges() {
1796 if (gaia_cookie_manager_service_) 1796 if (gaia_cookie_manager_service_)
1797 gaia_cookie_manager_service_->RemoveObserver(this); 1797 gaia_cookie_manager_service_->RemoveObserver(this);
1798 } 1798 }
1799 1799
1800 void PrintPreviewHandler::SetPdfSavedClosureForTesting( 1800 void PrintPreviewHandler::SetPdfSavedClosureForTesting(
1801 const base::Closure& closure) { 1801 const base::Closure& closure) {
1802 pdf_file_saved_closure_ = closure; 1802 pdf_file_saved_closure_ = closure;
1803 } 1803 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/core_options_handler.cc ('k') | chrome/browser/ui/webui/settings/about_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698