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

Side by Side Diff: printing/printed_document.cc

Issue 24989002: Cleanup: Use base namespace in printing/. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « printing/printed_document.h ('k') | printing/printed_pages_source.h » ('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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 int PrintedDocument::expected_page_count() const { 170 int PrintedDocument::expected_page_count() const {
171 base::AutoLock lock(lock_); 171 base::AutoLock lock(lock_);
172 return mutable_.expected_page_count_; 172 return mutable_.expected_page_count_;
173 } 173 }
174 174
175 void PrintedDocument::DebugDump(const PrintedPage& page) { 175 void PrintedDocument::DebugDump(const PrintedPage& page) {
176 if (!g_debug_dump_info.Get().enabled) 176 if (!g_debug_dump_info.Get().enabled)
177 return; 177 return;
178 178
179 string16 filename; 179 base::string16 filename;
180 filename += name(); 180 filename += name();
181 filename += ASCIIToUTF16("_"); 181 filename += base::ASCIIToUTF16("_");
182 filename += ASCIIToUTF16(base::StringPrintf("%02d", page.page_number())); 182 filename += base::ASCIIToUTF16(
183 base::StringPrintf("%02d", page.page_number()));
183 #if defined(OS_WIN) 184 #if defined(OS_WIN)
184 filename += ASCIIToUTF16("_.emf"); 185 filename += base::ASCIIToUTF16("_.emf");
185 page.metafile()->SaveTo( 186 page.metafile()->SaveTo(
186 g_debug_dump_info.Get().debug_dump_path.Append(filename)); 187 g_debug_dump_info.Get().debug_dump_path.Append(filename));
187 #else // OS_WIN 188 #else // OS_WIN
188 filename += ASCIIToUTF16("_.pdf"); 189 filename += base::ASCIIToUTF16("_.pdf");
189 page.metafile()->SaveTo( 190 page.metafile()->SaveTo(
190 g_debug_dump_info.Get().debug_dump_path.Append(UTF16ToUTF8(filename))); 191 g_debug_dump_info.Get().debug_dump_path.Append(
192 base::UTF16ToUTF8(filename)));
191 #endif // OS_WIN 193 #endif // OS_WIN
192 } 194 }
193 195
194 void PrintedDocument::set_debug_dump_path( 196 void PrintedDocument::set_debug_dump_path(
195 const base::FilePath& debug_dump_path) { 197 const base::FilePath& debug_dump_path) {
196 g_debug_dump_info.Get().enabled = !debug_dump_path.empty(); 198 g_debug_dump_info.Get().enabled = !debug_dump_path.empty();
197 g_debug_dump_info.Get().debug_dump_path = debug_dump_path; 199 g_debug_dump_info.Get().debug_dump_path = debug_dump_path;
198 } 200 }
199 201
200 const base::FilePath& PrintedDocument::debug_dump_path() { 202 const base::FilePath& PrintedDocument::debug_dump_path() {
(...skipping 25 matching lines...) Expand all
226 } 228 }
227 229
228 #if (defined(OS_POSIX) && defined(USE_AURA)) || defined(OS_ANDROID) 230 #if (defined(OS_POSIX) && defined(USE_AURA)) || defined(OS_ANDROID)
229 // This function is not used on aura linux/chromeos or android. 231 // This function is not used on aura linux/chromeos or android.
230 void PrintedDocument::RenderPrintedPage(const PrintedPage& page, 232 void PrintedDocument::RenderPrintedPage(const PrintedPage& page,
231 PrintingContext* context) const { 233 PrintingContext* context) const {
232 } 234 }
233 #endif 235 #endif
234 236
235 } // namespace printing 237 } // namespace printing
OLDNEW
« no previous file with comments | « printing/printed_document.h ('k') | printing/printed_pages_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698