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

Side by Side Diff: printing/printed_document.cc

Issue 1131113004: Convert JsonWriter::Write to taking a const ref for the in-param (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another rebase Created 5 years, 7 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
« no previous file with comments | « pdf/pdfium/pdfium_engine.cc ('k') | remoting/base/vlog_net_log.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "printing/printed_document.h" 5 #include "printing/printed_document.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 base::checked_cast<int>(data->size())); 71 base::checked_cast<int>(data->size()));
72 } 72 }
73 73
74 void DebugDumpSettings(const base::string16& doc_name, 74 void DebugDumpSettings(const base::string16& doc_name,
75 const PrintSettings& settings, 75 const PrintSettings& settings,
76 base::TaskRunner* blocking_runner) { 76 base::TaskRunner* blocking_runner) {
77 base::DictionaryValue job_settings; 77 base::DictionaryValue job_settings;
78 PrintSettingsToJobSettingsDebug(settings, &job_settings); 78 PrintSettingsToJobSettingsDebug(settings, &job_settings);
79 std::string settings_str; 79 std::string settings_str;
80 base::JSONWriter::WriteWithOptions( 80 base::JSONWriter::WriteWithOptions(
81 &job_settings, base::JSONWriter::OPTIONS_PRETTY_PRINT, &settings_str); 81 job_settings, base::JSONWriter::OPTIONS_PRETTY_PRINT, &settings_str);
82 scoped_refptr<base::RefCountedMemory> data = 82 scoped_refptr<base::RefCountedMemory> data =
83 base::RefCountedString::TakeString(&settings_str); 83 base::RefCountedString::TakeString(&settings_str);
84 blocking_runner->PostTask( 84 blocking_runner->PostTask(
85 FROM_HERE, 85 FROM_HERE,
86 base::Bind( 86 base::Bind(
87 &DebugDumpDataTask, doc_name, FILE_PATH_LITERAL(".json"), data)); 87 &DebugDumpDataTask, doc_name, FILE_PATH_LITERAL(".json"), data));
88 } 88 }
89 89
90 } // namespace 90 } // namespace
91 91
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 } 264 }
265 265
266 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) 266 #if defined(OS_CHROMEOS) || defined(OS_ANDROID)
267 // This function is not used on aura linux/chromeos or android. 267 // This function is not used on aura linux/chromeos or android.
268 void PrintedDocument::RenderPrintedPage(const PrintedPage& page, 268 void PrintedDocument::RenderPrintedPage(const PrintedPage& page,
269 PrintingContext* context) const { 269 PrintingContext* context) const {
270 } 270 }
271 #endif 271 #endif
272 272
273 } // namespace printing 273 } // namespace printing
OLDNEW
« no previous file with comments | « pdf/pdfium/pdfium_engine.cc ('k') | remoting/base/vlog_net_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698