OLD | NEW |
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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 base::Time now(base::Time::Now()); | 235 base::Time now(base::Time::Now()); |
236 filename = base::TimeFormatShortDateAndTime(now); | 236 filename = base::TimeFormatShortDateAndTime(now); |
237 filename += base::ASCIIToUTF16("_"); | 237 filename += base::ASCIIToUTF16("_"); |
238 filename += document_name; | 238 filename += document_name; |
239 base::FilePath::StringType system_filename; | 239 base::FilePath::StringType system_filename; |
240 #if defined(OS_WIN) | 240 #if defined(OS_WIN) |
241 system_filename = filename; | 241 system_filename = filename; |
242 #else // OS_WIN | 242 #else // OS_WIN |
243 system_filename = base::UTF16ToUTF8(filename); | 243 system_filename = base::UTF16ToUTF8(filename); |
244 #endif // OS_WIN | 244 #endif // OS_WIN |
245 file_util::ReplaceIllegalCharactersInPath(&system_filename, '_'); | 245 base::i18n::ReplaceIllegalCharactersInPath(&system_filename, '_'); |
246 return g_debug_dump_info.Get().Append(system_filename).AddExtension( | 246 return g_debug_dump_info.Get().Append(system_filename).AddExtension( |
247 extension); | 247 extension); |
248 } | 248 } |
249 | 249 |
250 void PrintedDocument::DebugDumpData( | 250 void PrintedDocument::DebugDumpData( |
251 const base::RefCountedMemory* data, | 251 const base::RefCountedMemory* data, |
252 const base::FilePath::StringType& extension) { | 252 const base::FilePath::StringType& extension) { |
253 if (g_debug_dump_info.Get().empty()) | 253 if (g_debug_dump_info.Get().empty()) |
254 return; | 254 return; |
255 immutable_.blocking_runner_->PostTask( | 255 immutable_.blocking_runner_->PostTask( |
(...skipping 26 matching lines...) Expand all Loading... |
282 } | 282 } |
283 | 283 |
284 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) | 284 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) |
285 // This function is not used on aura linux/chromeos or android. | 285 // This function is not used on aura linux/chromeos or android. |
286 void PrintedDocument::RenderPrintedPage(const PrintedPage& page, | 286 void PrintedDocument::RenderPrintedPage(const PrintedPage& page, |
287 PrintingContext* context) const { | 287 PrintingContext* context) const { |
288 } | 288 } |
289 #endif | 289 #endif |
290 | 290 |
291 } // namespace printing | 291 } // namespace printing |
OLD | NEW |