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

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

Issue 1419063002: Displaying "simplify page" on print preview by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Correcting histograms.xml Created 5 years, 1 month 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
« no previous file with comments | « chrome/browser/ui/tab_helpers.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 56d11484ca7bc16083ba369c996cefc7a39f099b..58e4374541c236a16aa5d8bfeb658971c7eabb14 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
@@ -1298,11 +1298,13 @@ void PrintPreviewHandler::SendInitialSettings(
GetNumberFormatAndMeasurementSystem(&initial_settings);
web_ui()->CallJavascriptFunction("setInitialSettings", initial_settings);
+ if (cmdline->HasSwitch(switches::kDisablePrintPreviewSimplify))
+ return;
+
WebContents* initiator = GetInitiator();
- if (initiator && cmdline->HasSwitch(switches::kEnableDomDistiller) &&
- dom_distiller::url_utils::IsUrlDistillable(
- initiator->GetLastCommittedURL())) {
- web_ui()->CallJavascriptFunction("detectDistillablePage");
+ if (initiator && dom_distiller::url_utils::IsUrlDistillable(
+ initiator->GetLastCommittedURL())) {
+ web_ui()->CallJavascriptFunction("allowDistillPage");
}
}
« no previous file with comments | « chrome/browser/ui/tab_helpers.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698