| Index: components/dom_distiller/core/page_distiller.cc
|
| diff --git a/components/dom_distiller/core/page_distiller.cc b/components/dom_distiller/core/page_distiller.cc
|
| index db941ab011fc04c6dd4dcf2c8e938c0f244f3231..cf94ec117c9d6a2aa858185b6edff4fe9c71656d 100644
|
| --- a/components/dom_distiller/core/page_distiller.cc
|
| +++ b/components/dom_distiller/core/page_distiller.cc
|
| @@ -63,6 +63,7 @@ void PageDistiller::OnExecuteJavaScriptDone(const GURL& page_url,
|
| scoped_ptr<DistilledPageInfo> page_info(new DistilledPageInfo());
|
| std::string result;
|
| const base::ListValue* result_list = NULL;
|
| + bool found_content = false;
|
| if (!value->GetAsList(&result_list)) {
|
| base::MessageLoop::current()->PostTask(
|
| FROM_HERE,
|
| @@ -83,6 +84,7 @@ void PageDistiller::OnExecuteJavaScriptDone(const GURL& page_url,
|
| break;
|
| case 1:
|
| page_info->html = item;
|
| + found_content = true;
|
| break;
|
| case 2:
|
| page_info->next_page_url = item;
|
| @@ -91,12 +93,17 @@ void PageDistiller::OnExecuteJavaScriptDone(const GURL& page_url,
|
| page_info->prev_page_url = item;
|
| break;
|
| default:
|
| - page_info->image_urls.push_back(item);
|
| + GURL unvalidated_gurl(item);
|
| + if (!unvalidated_gurl.is_empty() && unvalidated_gurl.is_valid()) {
|
| + page_info->image_urls.push_back(item);
|
| + }
|
| }
|
| }
|
| base::MessageLoop::current()->PostTask(
|
| FROM_HERE,
|
| - base::Bind(page_distiller_callback_, base::Passed(&page_info), true));
|
| + base::Bind(page_distiller_callback_,
|
| + base::Passed(&page_info),
|
| + found_content));
|
| }
|
| }
|
|
|
|
|