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

Side by Side Diff: printing/printed_document.cc

Issue 6246036: FilePath: Remove most of ToWStringHack, adding a LossyDisplayName() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: bug link Created 9 years, 10 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 | « chrome/tools/crash_service/main.cc ('k') | views/drag_utils.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 filename += date(); 244 filename += date();
245 filename += ASCIIToUTF16("_"); 245 filename += ASCIIToUTF16("_");
246 filename += time(); 246 filename += time();
247 filename += ASCIIToUTF16("_"); 247 filename += ASCIIToUTF16("_");
248 filename += name(); 248 filename += name();
249 filename += ASCIIToUTF16("_"); 249 filename += ASCIIToUTF16("_");
250 filename += ASCIIToUTF16(StringPrintf("%02d", page.page_number())); 250 filename += ASCIIToUTF16(StringPrintf("%02d", page.page_number()));
251 filename += ASCIIToUTF16("_.emf"); 251 filename += ASCIIToUTF16("_.emf");
252 #if defined(OS_WIN) 252 #if defined(OS_WIN)
253 page.native_metafile()->SaveTo( 253 page.native_metafile()->SaveTo(
254 g_debug_dump_info.Get().debug_dump_path.Append(filename).ToWStringHack()); 254 g_debug_dump_info.Get().debug_dump_path.Append(filename).value());
255 #else // OS_WIN 255 #else // OS_WIN
256 NOTIMPLEMENTED(); 256 NOTIMPLEMENTED(); // TODO: convert SaveTo to accept a FilePath
257 #endif // OS_WIN 257 #endif // OS_WIN
258 } 258 }
259 259
260 void PrintedDocument::set_debug_dump_path(const FilePath& debug_dump_path) { 260 void PrintedDocument::set_debug_dump_path(const FilePath& debug_dump_path) {
261 g_debug_dump_info.Get().enabled = !debug_dump_path.empty(); 261 g_debug_dump_info.Get().enabled = !debug_dump_path.empty();
262 g_debug_dump_info.Get().debug_dump_path = debug_dump_path; 262 g_debug_dump_info.Get().debug_dump_path = debug_dump_path;
263 } 263 }
264 264
265 const FilePath& PrintedDocument::debug_dump_path() { 265 const FilePath& PrintedDocument::debug_dump_path() {
266 return g_debug_dump_info.Get().debug_dump_path; 266 return g_debug_dump_info.Get().debug_dump_path;
(...skipping 17 matching lines...) Expand all
284 name_(source->RenderSourceName()), 284 name_(source->RenderSourceName()),
285 url_(source->RenderSourceUrl()), 285 url_(source->RenderSourceUrl()),
286 cookie_(cookie) { 286 cookie_(cookie) {
287 SetDocumentDate(); 287 SetDocumentDate();
288 } 288 }
289 289
290 PrintedDocument::Immutable::~Immutable() { 290 PrintedDocument::Immutable::~Immutable() {
291 } 291 }
292 292
293 } // namespace printing 293 } // namespace printing
OLDNEW
« no previous file with comments | « chrome/tools/crash_service/main.cc ('k') | views/drag_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698