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

Unified Diff: third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp

Issue 2247063002: Allow loading MHTML archive from content scheme (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 4 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp
diff --git a/third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp b/third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp
index 26fe8ab4d8e1b3b88d67c43482a0c6c3288da1db..0d3bd10c739a7fdc363b0bb9675cd0c9bfbe8651 100644
--- a/third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp
+++ b/third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp
@@ -69,9 +69,13 @@ MHTMLArchive::MHTMLArchive()
MHTMLArchive* MHTMLArchive::create(const KURL& url, PassRefPtr<SharedBuffer> data)
{
- // MHTML pages can only be loaded from local URLs and http/https URLs.
+ // MHTML pages can only be loaded from local URLs, http/https URLs, and content URLs(Android specific).
// The latter is now allowed due to full sandboxing enforcement on MHTML pages.
- if (!SchemeRegistry::shouldTreatURLSchemeAsLocal(url.protocol()) && !url.protocolIsInHTTPFamily())
+ if (!SchemeRegistry::shouldTreatURLSchemeAsLocal(url.protocol()) && !url.protocolIsInHTTPFamily()
+#if (DE_OS == DE_OS_ANDROID)
jianli 2016/08/17 01:12:49 I don't think this is a correct check. You should
Vivian 2016/08/17 17:27:18 Done.
+ && !url.protocolIs("content")
+#endif
+ )
return nullptr;
MHTMLParser parser(data);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698