Chromium Code Reviews| Index: ios/chrome/browser/reading_list/url_downloader.cc |
| diff --git a/ios/chrome/browser/reading_list/url_downloader.cc b/ios/chrome/browser/reading_list/url_downloader.cc |
| index 93afe9b1f05c3ae1798f94bbfc4740e80127747f..7fb822716a75f62cbef81488a5093699ba60d0ff 100644 |
| --- a/ios/chrome/browser/reading_list/url_downloader.cc |
| +++ b/ios/chrome/browser/reading_list/url_downloader.cc |
| @@ -248,10 +248,14 @@ std::string URLDownloader::SaveAndReplaceImagesInHTML( |
| // Data URI, the data part of the image is empty, no need to store it. |
| continue; |
| } |
| - base::FilePath local_image_path; |
| - std::string local_image_name; |
| - if (!SaveImage(url, images[i].url, images[i].data, &local_image_name)) { |
| - return std::string(); |
| + std::string local_image_name = ""; |
|
jif
2017/01/20 10:45:26
afaik you don't need to initialize local_image_nam
Olivier
2017/01/20 10:54:44
Done.
|
| + if (!(distilled_url_.SchemeIsCryptographic() && |
|
jif
2017/01/20 10:45:26
Because it confused me a bit, can you rewrite it a
Olivier
2017/01/20 10:54:44
Done.
|
| + !images[i].url.SchemeIsCryptographic())) { |
| + // Only save images if it is not mixed content. |
| + // Mixed content is HTTP imaged on HTTPS pages. |
|
jif
2017/01/20 10:45:26
s/imaged/images/
I appreciate the reminder of wha
Olivier
2017/01/20 10:54:44
Done.
|
| + if (!SaveImage(url, images[i].url, images[i].data, &local_image_name)) { |
| + return std::string(); |
|
jif
2017/01/20 10:45:26
Optional nit (because not introduced by your CL, a
Olivier
2017/01/20 10:54:44
Returning the html empty will result in a distilla
|
| + } |
| } |
| std::string image_url = net::EscapeForHTML(images[i].url.spec()); |
| size_t image_url_size = image_url.size(); |