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

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

Issue 2824283004: Mark some PrintPreviewUI methods as const. (Closed)
Patch Set: Created 3 years, 8 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
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 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 } 1012 }
1013 1013
1014 void PrintPreviewHandler::PrintToPdf() { 1014 void PrintPreviewHandler::PrintToPdf() {
1015 if (!print_to_pdf_path_.empty()) { 1015 if (!print_to_pdf_path_.empty()) {
1016 // User has already selected a path, no need to show the dialog again. 1016 // User has already selected a path, no need to show the dialog again.
1017 PostPrintToPdfTask(); 1017 PostPrintToPdfTask();
1018 } else if (!select_file_dialog_.get() || 1018 } else if (!select_file_dialog_.get() ||
1019 !select_file_dialog_->IsRunning(platform_util::GetTopLevel( 1019 !select_file_dialog_->IsRunning(platform_util::GetTopLevel(
1020 preview_web_contents()->GetNativeView()))) { 1020 preview_web_contents()->GetNativeView()))) {
1021 // Pre-populating select file dialog with print job title. 1021 // Pre-populating select file dialog with print job title.
1022 base::string16 print_job_title_utf16 = 1022 const base::string16& print_job_title_utf16 =
1023 print_preview_ui()->initiator_title(); 1023 print_preview_ui()->initiator_title();
1024 1024
1025 #if defined(OS_WIN) 1025 #if defined(OS_WIN)
1026 base::FilePath::StringType print_job_title(print_job_title_utf16); 1026 base::FilePath::StringType print_job_title(print_job_title_utf16);
1027 #elif defined(OS_POSIX) 1027 #elif defined(OS_POSIX)
1028 base::FilePath::StringType print_job_title = 1028 base::FilePath::StringType print_job_title =
1029 base::UTF16ToUTF8(print_job_title_utf16); 1029 base::UTF16ToUTF8(print_job_title_utf16);
1030 #endif 1030 #endif
1031 1031
1032 base::i18n::ReplaceIllegalCharactersInPath(&print_job_title, '_'); 1032 base::i18n::ReplaceIllegalCharactersInPath(&print_job_title, '_');
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
1794 1794
1795 void PrintPreviewHandler::UnregisterForGaiaCookieChanges() { 1795 void PrintPreviewHandler::UnregisterForGaiaCookieChanges() {
1796 if (gaia_cookie_manager_service_) 1796 if (gaia_cookie_manager_service_)
1797 gaia_cookie_manager_service_->RemoveObserver(this); 1797 gaia_cookie_manager_service_->RemoveObserver(this);
1798 } 1798 }
1799 1799
1800 void PrintPreviewHandler::SetPdfSavedClosureForTesting( 1800 void PrintPreviewHandler::SetPdfSavedClosureForTesting(
1801 const base::Closure& closure) { 1801 const base::Closure& closure) {
1802 pdf_file_saved_closure_ = closure; 1802 pdf_file_saved_closure_ = closure;
1803 } 1803 }
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_preview_data_service.cc ('k') | chrome/browser/ui/webui/print_preview/print_preview_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698