summaryrefslogtreecommitdiffstats
path: root/content/browser/chrome_blob_storage_context.h
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-21 03:57:42 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-21 03:57:42 +0000
commit314c3e2d86a4595db7b1ab02b2acd4decf21d65f (patch)
tree593431d4dad2fa3c944d8e8f97da3f6fc56140f6 /content/browser/chrome_blob_storage_context.h
parentc537090136d23d0064488c27de3bb2ba0f1ac120 (diff)
downloadchromium_src-314c3e2d86a4595db7b1ab02b2acd4decf21d65f.zip
chromium_src-314c3e2d86a4595db7b1ab02b2acd4decf21d65f.tar.gz
chromium_src-314c3e2d86a4595db7b1ab02b2acd4decf21d65f.tar.bz2
Remove getters for HTML5 related objects from the ResourceContext interface. Half of them weren't used by chrome, so they can be hidden from chrome. The rest were accessed by chrome, but we don't need every embedder to store this data on their ResourceContext implementation. Instead have content associate the data itself to simplify the work for embedders.
BUG=98716 Review URL: https://chromiumcodereview.appspot.com/9425026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122790 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/chrome_blob_storage_context.h')
-rw-r--r--content/browser/chrome_blob_storage_context.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/content/browser/chrome_blob_storage_context.h b/content/browser/chrome_blob_storage_context.h
index e83271c..0b5c820 100644
--- a/content/browser/chrome_blob_storage_context.h
+++ b/content/browser/chrome_blob_storage_context.h
@@ -12,10 +12,16 @@
#include "content/common/content_export.h"
#include "content/public/browser/browser_thread.h"
+namespace content {
+class BrowserContext;
+}
+
namespace webkit_blob {
class BlobStorageController;
}
+struct ChromeBlobStorageContextDeleter;
+
// A context class that keeps track of BlobStorageController used by the chrome.
// There is an instance associated with each BrowserContext. There could be
// multiple URLRequestContexts in the same browser context that refers to the
@@ -25,9 +31,13 @@ class BlobStorageController;
// the IO thread (unless specifically called out in doc comments).
class CONTENT_EXPORT ChromeBlobStorageContext
: public base::RefCountedThreadSafe<
- ChromeBlobStorageContext, content::BrowserThread::DeleteOnIOThread> {
+ ChromeBlobStorageContext, ChromeBlobStorageContextDeleter> {
public:
+ static ChromeBlobStorageContext* GetFor(
+ content::BrowserContext* browser_context);
+
ChromeBlobStorageContext();
+ virtual ~ChromeBlobStorageContext();
void InitializeOnIOThread();
@@ -36,14 +46,17 @@ class CONTENT_EXPORT ChromeBlobStorageContext
}
private:
- friend class base::RefCountedThreadSafe<
- ChromeBlobStorageContext, content::BrowserThread::DeleteOnIOThread>;
- friend class content::BrowserThread;
- friend class base::DeleteHelper<ChromeBlobStorageContext>;
+ friend struct ChromeBlobStorageContextDeleter;
- virtual ~ChromeBlobStorageContext();
+ void DeleteOnCorrectThread() const;
scoped_ptr<webkit_blob::BlobStorageController> controller_;
};
+struct ChromeBlobStorageContextDeleter {
+ static void Destruct(const ChromeBlobStorageContext* context) {
+ context->DeleteOnCorrectThread();
+ }
+};
+
#endif // CONTENT_BROWSER_CHROME_BLOB_STORAGE_CONTEXT_H_