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

Unified Diff: chrome/browser/ui/webui/print_preview/print_preview_handler.cc

Issue 16290004: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/print_preview/print_preview_handler.cc
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
index dbbfd95b8eef166b4bdb428e8f218947b92171de..6db50fca107c8206eab12ef4c75503c153d79324 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
@@ -550,7 +550,7 @@ void PrintPreviewHandler::HandlePrint(const ListValue* args) {
UMA_HISTOGRAM_COUNTS("PrintPreview.PageCount.PrintToCloudPrint",
page_count);
ReportUserActionHistogram(PRINT_WITH_CLOUD_PRINT);
- SendCloudPrintJob(data);
+ SendCloudPrintJob(data.get());
} else {
UMA_HISTOGRAM_COUNTS("PrintPreview.PageCount.PrintToPrinter", page_count);
ReportUserActionHistogram(PRINT_TO_PRINTER);
@@ -595,10 +595,9 @@ void PrintPreviewHandler::PrintToPdf() {
if (print_to_pdf_path_.get()) {
// User has already selected a path, no need to show the dialog again.
PostPrintToPdfTask();
- } else if (!select_file_dialog_ ||
- !select_file_dialog_->IsRunning(
- platform_util::GetTopLevel(
- preview_web_contents()->GetView()->GetNativeView()))) {
+ } else if (!select_file_dialog_.get() ||
+ !select_file_dialog_->IsRunning(platform_util::GetTopLevel(
+ preview_web_contents()->GetView()->GetNativeView()))) {
PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>(
web_ui()->GetController());
// Pre-populating select file dialog with print job title.
@@ -709,7 +708,7 @@ void PrintPreviewHandler::PrintWithCloudPrintDialog() {
print_dialog_cloud::CreatePrintDialogForBytes(
preview_web_contents()->GetBrowserContext(),
modal_parent,
- data,
+ data.get(),
title,
string16(),
std::string("application/pdf"));
@@ -1079,7 +1078,7 @@ bool PrintPreviewHandler::GetPreviewDataAndTitle(
print_preview_ui->GetPrintPreviewDataForIndex(
printing::COMPLETE_PREVIEW_DOCUMENT_INDEX, &tmp_data);
- if (!tmp_data) {
+ if (!tmp_data.get()) {
// Nothing to print, no preview available.
return false;
}
« no previous file with comments | « chrome/browser/ui/webui/options/options_ui.cc ('k') | chrome/browser/ui/webui/print_preview/print_preview_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698