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

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

Issue 447403002: Move file_util_icu to base::i18n namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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/browser/shell_integration_linux.cc ('k') | chrome/browser/web_applications/web_app.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) 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 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 // Pre-populating select file dialog with print job title. 880 // Pre-populating select file dialog with print job title.
881 base::string16 print_job_title_utf16 = print_preview_ui->initiator_title(); 881 base::string16 print_job_title_utf16 = print_preview_ui->initiator_title();
882 882
883 #if defined(OS_WIN) 883 #if defined(OS_WIN)
884 base::FilePath::StringType print_job_title(print_job_title_utf16); 884 base::FilePath::StringType print_job_title(print_job_title_utf16);
885 #elif defined(OS_POSIX) 885 #elif defined(OS_POSIX)
886 base::FilePath::StringType print_job_title = 886 base::FilePath::StringType print_job_title =
887 base::UTF16ToUTF8(print_job_title_utf16); 887 base::UTF16ToUTF8(print_job_title_utf16);
888 #endif 888 #endif
889 889
890 file_util::ReplaceIllegalCharactersInPath(&print_job_title, '_'); 890 base::i18n::ReplaceIllegalCharactersInPath(&print_job_title, '_');
891 base::FilePath default_filename(print_job_title); 891 base::FilePath default_filename(print_job_title);
892 default_filename = 892 default_filename =
893 default_filename.ReplaceExtension(FILE_PATH_LITERAL("pdf")); 893 default_filename.ReplaceExtension(FILE_PATH_LITERAL("pdf"));
894 894
895 SelectFile(default_filename); 895 SelectFile(default_filename);
896 } 896 }
897 } 897 }
898 898
899 void PrintPreviewHandler::HandleHidePreview(const base::ListValue* /*args*/) { 899 void PrintPreviewHandler::HandleHidePreview(const base::ListValue* /*args*/) {
900 PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>( 900 PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>(
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
1562 1562
1563 void PrintPreviewHandler::UnregisterForMergeSession() { 1563 void PrintPreviewHandler::UnregisterForMergeSession() {
1564 if (reconcilor_) 1564 if (reconcilor_)
1565 reconcilor_->RemoveMergeSessionObserver(this); 1565 reconcilor_->RemoveMergeSessionObserver(this);
1566 } 1566 }
1567 1567
1568 void PrintPreviewHandler::SetPdfSavedClosureForTesting( 1568 void PrintPreviewHandler::SetPdfSavedClosureForTesting(
1569 const base::Closure& closure) { 1569 const base::Closure& closure) {
1570 pdf_file_saved_closure_ = closure; 1570 pdf_file_saved_closure_ = closure;
1571 } 1571 }
OLDNEW
« no previous file with comments | « chrome/browser/shell_integration_linux.cc ('k') | chrome/browser/web_applications/web_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698