diff options
author | jsbell <jsbell@chromium.org> | 2016-03-22 09:42:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-22 16:44:26 +0000 |
commit | 5721760f19e829770503b2aa4e51ff76848f2270 (patch) | |
tree | ac501c0b69085a0857be5d19dd6310522ac90261 /content/renderer | |
parent | beefd98f2517bf00a43ba7e52290418495ef846a (diff) | |
download | chromium_src-5721760f19e829770503b2aa4e51ff76848f2270.zip chromium_src-5721760f19e829770503b2aa4e51ff76848f2270.tar.gz chromium_src-5721760f19e829770503b2aa4e51ff76848f2270.tar.bz2 |
Fix effective Origin URLs for IDB + Cache for file:/// pages
This is a terrible, horrible, no good, very bad hack.
Previously, storage APIs (notable, Indexed DB, Cache Storage) would
pass the origins they operated on from Blink to Chromium's
content/browser as a serialization done through
SecurityOrigin->DatabaseIdentifier->String->IPC->String->GURL. That
was simplified to SecurityOrigin->String->GURL->IPC. A side effect of
this was that pages browsed as file:// URLs would end up as invalid
GURLs due to stricter checks in the SecurityOrigin->String step.
Special case that conversion to restore the previous behavior.
R=michaeln@chromium.org,mkwst@chromium.org
BUG=595840
Review URL: https://codereview.chromium.org/1810193002
Cr-Commit-Position: refs/heads/master@{#382587}
Diffstat (limited to 'content/renderer')
-rw-r--r-- | content/renderer/renderer_blink_platform_impl.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc index 2de292d..9409b90 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc @@ -33,6 +33,7 @@ #include "content/child/quota_dispatcher.h" #include "content/child/quota_message_filter.h" #include "content/child/simple_webmimeregistry_impl.h" +#include "content/child/storage_util.h" #include "content/child/thread_safe_sender.h" #include "content/child/web_database_observer_impl.h" #include "content/child/web_url_loader_impl.h" @@ -436,9 +437,8 @@ WebIDBFactory* RendererBlinkPlatformImpl::idbFactory() { blink::WebServiceWorkerCacheStorage* RendererBlinkPlatformImpl::cacheStorage( const blink::WebSecurityOrigin& security_origin) { - const GURL origin = blink::WebStringToGURL(security_origin.toString()); - return new WebServiceWorkerCacheStorageImpl(thread_safe_sender_.get(), - origin); + return new WebServiceWorkerCacheStorageImpl( + thread_safe_sender_.get(), WebSecurityOriginToGURL(security_origin)); } //------------------------------------------------------------------------------ |