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

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

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.h
diff --git a/third_party/WebKit/Source/core/html/PublicURLManager.h b/third_party/WebKit/Source/core/html/PublicURLManager.h
index ec5943508559e40b14ae7af204f6192378287e06..5bdde1b5ae7286285b28d15f0d9b4f823ca5a30e 100644
--- a/third_party/WebKit/Source/core/html/PublicURLManager.h
+++ b/third_party/WebKit/Source/core/html/PublicURLManager.h
@@ -29,14 +29,12 @@
#include "core/dom/ActiveDOMObject.h"
#include "platform/heap/Handle.h"
#include "wtf/HashMap.h"
-#include "wtf/HashSet.h"
#include "wtf/text/WTFString.h"
namespace blink {
class KURL;
class ExecutionContext;
-class SecurityOrigin;
class URLRegistry;
class URLRegistrable;
@@ -45,8 +43,18 @@ class PublicURLManager final : public GarbageCollectedFinalized<PublicURLManager
public:
static PublicURLManager* create(ExecutionContext*);
- void registerURL(SecurityOrigin*, const KURL&, URLRegistrable*, const String& uuid = String());
+ // Generates a new Blob URL and registers the URLRegistrable to the
+ // corresponding URLRegistry with the Blob URL. Returns the serialization
+ // of the Blob URL.
+ //
+ // |uuid| can be used for revoke() to revoke all URLs associated with the
+ // |uuid|. It's not the UUID generated and appended to the BlobURL, but an
+ // identifier for the object to which URL(s) are generated e.g. ones
+ // returned by blink::Blob::uuid().
+ String registerURL(ExecutionContext*, URLRegistrable*, const String& uuid);
+ // Revokes the given URL.
void revoke(const KURL&);
+ // Revokes all URLs associated with |uuid|.
void revoke(const String& uuid);
// ActiveDOMObject interface.
@@ -61,6 +69,9 @@ private:
// Objects need be revoked by unique ID in some cases.
typedef String URLString;
typedef HashMap<URLString, String> URLMap;
+ // Map from URLRegistry instances to the maps which store association
+ // between URLs registered with the URLRegistry and UUIDs assigned for
+ // each of the URLs.
typedef HashMap<URLRegistry*, URLMap> RegistryURLMap;
RegistryURLMap m_registryToURL;
« no previous file with comments | « third_party/WebKit/Source/core/fileapi/Blob.cpp ('k') | third_party/WebKit/Source/core/html/PublicURLManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698