Chromium Code Reviews| Index: chrome/browser/dom_distiller/tab_utils.cc |
| diff --git a/chrome/browser/dom_distiller/tab_utils.cc b/chrome/browser/dom_distiller/tab_utils.cc |
| index c288d909129f8ea72516bf60ad52064a7553f49c..1c583401a25222a3240d0fb3d88826a236869dab 100644 |
| --- a/chrome/browser/dom_distiller/tab_utils.cc |
| +++ b/chrome/browser/dom_distiller/tab_utils.cc |
| @@ -111,6 +111,11 @@ void StartNavigationToDistillerViewer(content::WebContents* web_contents, |
| } |
| void StartDistillation(content::WebContents* web_contents) { |
| + const GURL& last_committed_url = web_contents->GetLastCommittedURL(); |
| + if (!dom_distiller::url_utils::IsUrlDistillable(last_committed_url)) { |
|
nyquist
2015/03/13 21:21:20
If the distillation is not started here, wouldn't
nyquist
2015/03/13 23:46:08
Please remove the curly braces.
nyquist
2015/03/14 00:49:57
Also; I guess at that point we would have to renam
|
| + return; |
| + } |
| + |
| // Start distillation using |web_contents|, and ensure ViewerHandle stays |
| // around until the viewer requests distillation. |
| SelfDeletingRequestDelegate* view_request_delegate = |
| @@ -125,7 +130,6 @@ void StartDistillation(content::WebContents* web_contents) { |
| dom_distiller_service->CreateDefaultDistillerPageWithHandle( |
| source_page_handle.Pass()).Pass(); |
| - const GURL& last_committed_url = web_contents->GetLastCommittedURL(); |
| scoped_ptr<ViewerHandle> viewer_handle = dom_distiller_service->ViewUrl( |
| view_request_delegate, distiller_page.Pass(), last_committed_url); |
| view_request_delegate->TakeViewerHandle(viewer_handle.Pass()); |