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

Side by Side Diff: webkit/browser/blob/blob_storage_host.h

Issue 23223003: Chromium Blob hacking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_BROWSER_BLOB_BLOB_STORAGE_HOST_H_ 5 #ifndef WEBKIT_BROWSER_BLOB_BLOB_STORAGE_HOST_H_
6 #define WEBKIT_BROWSER_BLOB_BLOB_STORAGE_HOST_H_ 6 #define WEBKIT_BROWSER_BLOB_BLOB_STORAGE_HOST_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 29 matching lines...) Expand all
40 const BlobData::Item& data_item) WARN_UNUSED_RESULT; 40 const BlobData::Item& data_item) WARN_UNUSED_RESULT;
41 bool CancelBuildingBlob(const std::string& uuid) WARN_UNUSED_RESULT; 41 bool CancelBuildingBlob(const std::string& uuid) WARN_UNUSED_RESULT;
42 bool FinishBuildingBlob(const std::string& uuid, 42 bool FinishBuildingBlob(const std::string& uuid,
43 const std::string& type) WARN_UNUSED_RESULT; 43 const std::string& type) WARN_UNUSED_RESULT;
44 bool IncrementBlobRefCount(const std::string& uuid) WARN_UNUSED_RESULT; 44 bool IncrementBlobRefCount(const std::string& uuid) WARN_UNUSED_RESULT;
45 bool DecrementBlobRefCount(const std::string& uuid) WARN_UNUSED_RESULT; 45 bool DecrementBlobRefCount(const std::string& uuid) WARN_UNUSED_RESULT;
46 bool RegisterPublicBlobURL(const GURL& blob_url, 46 bool RegisterPublicBlobURL(const GURL& blob_url,
47 const std::string& uuid) WARN_UNUSED_RESULT; 47 const std::string& uuid) WARN_UNUSED_RESULT;
48 bool RevokePublicBlobURL(const GURL& blob_url) WARN_UNUSED_RESULT; 48 bool RevokePublicBlobURL(const GURL& blob_url) WARN_UNUSED_RESULT;
49 49
50 // Temporary support for mapping old style private blob urls to uuids.
51 void DeprecatedRegisterBlobURL(const GURL& private_url,
52 const std::string& uuid);
53 void DeprecatedCloneBlobURL(const GURL& url,
54 const GURL& src_private_url);
55 void DeprecatedRevokeBlobURL(const GURL& url);
56
50 private: 57 private:
51 typedef std::map<std::string, int> BlobReferenceMap; 58 typedef std::map<std::string, int> BlobReferenceMap;
52 59
53 bool IsInUseInHost(const std::string& uuid); 60 bool IsInUseInHost(const std::string& uuid);
54 bool IsBeingBuiltInHost(const std::string& uuid); 61 bool IsBeingBuiltInHost(const std::string& uuid);
55 bool IsUrlRegisteredInHost(const GURL& blob_url); 62 bool IsUrlRegisteredInHost(const GURL& blob_url);
56 63
57 // Collection of blob ids and a count of how many usages 64 // Collection of blob ids and a count of how many usages
58 // of that id are attributable to this consumer. 65 // of that id are attributable to this consumer.
59 BlobReferenceMap blobs_inuse_map_; 66 BlobReferenceMap blobs_inuse_map_;
60 67
61 // The set of public blob urls coined by this consumer. 68 // The set of public blob urls coined by this consumer.
62 std::set<GURL> public_blob_urls_; 69 std::set<GURL> public_blob_urls_;
63 70
71 // And private deprecated blob urls.
72 std::set<GURL> private_blob_urls_;
73
64 base::WeakPtr<BlobStorageContext> context_; 74 base::WeakPtr<BlobStorageContext> context_;
75
76 DISALLOW_COPY_AND_ASSIGN(BlobStorageHost);
65 }; 77 };
66 78
67 } // namespace webkit_blob 79 } // namespace webkit_blob
68 80
69 #endif // WEBKIT_BROWSER_BLOB_BLOB_STORAGE_HOST_H_ 81 #endif // WEBKIT_BROWSER_BLOB_BLOB_STORAGE_HOST_H_
OLDNEW
« no previous file with comments | « webkit/browser/blob/blob_storage_controller_unittest.cc ('k') | webkit/browser/blob/blob_storage_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698