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

Unified Diff: third_party/WebKit/Source/core/html/PublicURLManager.cpp

Issue 2268973002: Rename SecurityOriginCache to URLSecurityOriginMap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Created 4 years, 3 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
Index: third_party/WebKit/Source/core/html/PublicURLManager.cpp
diff --git a/third_party/WebKit/Source/core/html/PublicURLManager.cpp b/third_party/WebKit/Source/core/html/PublicURLManager.cpp
index 17de8de0e39f6e9867f14d880e0692083d871843..82dc651c43585173905a08e58cb931249c1c0941 100644
--- a/third_party/WebKit/Source/core/html/PublicURLManager.cpp
+++ b/third_party/WebKit/Source/core/html/PublicURLManager.cpp
@@ -26,14 +26,16 @@
#include "core/html/PublicURLManager.h"
-#include "core/fetch/MemoryCache.h"
#include "core/html/URLRegistry.h"
+#include "platform/blob/BlobURL.h"
#include "platform/weborigin/KURL.h"
#include "wtf/Vector.h"
#include "wtf/text/StringHash.h"
namespace blink {
+class SecurityOrigin;
+
PublicURLManager* PublicURLManager::create(ExecutionContext* context)
{
PublicURLManager* publicURLManager = new PublicURLManager(context);
@@ -47,14 +49,22 @@ PublicURLManager::PublicURLManager(ExecutionContext* context)
{
}
-void PublicURLManager::registerURL(SecurityOrigin* origin, const KURL& url, URLRegistrable* registrable, const String& uuid)
+String PublicURLManager::registerURL(ExecutionContext* context, URLRegistrable* registrable, const String& uuid)
{
- if (m_isStopped)
- return;
+ SecurityOrigin* origin = context->getSecurityOrigin();
+ const KURL& url = BlobURL::createPublicURL(origin);
+ if (url.isEmpty())
+ return String();
+
+ const String& urlString = url.getString();
+
+ if (!m_isStopped) {
+ RegistryURLMap::ValueType* found = m_registryToURL.add(&registrable->registry(), URLMap()).storedValue;
+ found->key->registerURL(origin, url, registrable);
+ found->value.add(urlString, uuid);
+ }
- RegistryURLMap::ValueType* found = m_registryToURL.add(&registrable->registry(), URLMap()).storedValue;
- found->key->registerURL(origin, url, registrable);
- found->value.add(url.getString(), uuid);
+ return urlString;
}
void PublicURLManager::revoke(const KURL& url)

Powered by Google App Engine
This is Rietveld 408576698