Chromium Code Reviews| 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 cf0ab046dec1e896d7dc2182fc19bcf556781aa2..a60b7ddb778359ec5c3da0558941326cea7a56e2 100644 |
| --- a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc |
| +++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc |
| @@ -1292,22 +1292,14 @@ void PrintPreviewHandler::SendInitialSettings( |
| web_ui()->CallJavascriptFunction("setInitialSettings", initial_settings); |
| WebContents* initiator = GetInitiator(); |
| - if (initiator && cmdline->HasSwitch(switches::kEnableDomDistiller) && |
| + if (initiator && |
| + !(cmdline->HasSwitch(switches::kDisablePrintPreviewSimplify)) && |
|
Lei Zhang
2015/10/29 19:14:57
nit: Too many parenthesis. Just !cmdline->Foo() &&
mvendramini_hp
2015/10/30 11:05:36
Done.
|
| dom_distiller::url_utils::IsUrlDistillable( |
| initiator->GetLastCommittedURL())) { |
| - dom_distiller::IsDistillablePage( |
| - initiator, false, |
| - base::Bind(&PrintPreviewHandler::HandleIsPageDistillableResult, |
| - weak_factory_.GetWeakPtr())); |
| + web_ui()->CallJavascriptFunction("allowDistillPage"); |
| } |
| } |
| -void PrintPreviewHandler::HandleIsPageDistillableResult(bool distillable) { |
| - VLOG(1) << "Distillable page detection finished"; |
| - if (distillable) |
| - web_ui()->CallJavascriptFunction("detectDistillablePage"); |
| -} |
| - |
| void PrintPreviewHandler::ClosePreviewDialog() { |
| print_preview_ui()->OnClosePrintPreviewDialog(); |
| } |