| 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(®istrable->registry(), URLMap()).storedValue;
|
| + found->key->registerURL(origin, url, registrable);
|
| + found->value.add(urlString, uuid);
|
| + }
|
|
|
| - RegistryURLMap::ValueType* found = m_registryToURL.add(®istrable->registry(), URLMap()).storedValue;
|
| - found->key->registerURL(origin, url, registrable);
|
| - found->value.add(url.getString(), uuid);
|
| + return urlString;
|
| }
|
|
|
| void PublicURLManager::revoke(const KURL& url)
|
|
|