summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profiles
diff options
context:
space:
mode:
authordgrogan@chromium.org <dgrogan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-01 02:42:27 +0000
committerdgrogan@chromium.org <dgrogan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-01 02:42:27 +0000
commit549579776e121f7a3168a3f7abaa6ab2ccbff24c (patch)
tree9482ebf376c49b27e18baef24e8c2f9a2fa44005 /chrome/browser/profiles
parent91c63e59fa67f3e07f1c6e7f5c7d16ebbcb0d5d7 (diff)
downloadchromium_src-549579776e121f7a3168a3f7abaa6ab2ccbff24c.zip
chromium_src-549579776e121f7a3168a3f7abaa6ab2ccbff24c.tar.gz
chromium_src-549579776e121f7a3168a3f7abaa6ab2ccbff24c.tar.bz2
Initial IndexedDBQuotaClient implementation
* Heavily based off of DatabaseQuotaClient. * Only responds to one request so far, GetOriginUsage. BUG=83652 TEST=llvm/Debug/unit_tests --gtest_filter=IndexedDB* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=87076 Review URL: http://codereview.chromium.org/7053030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87424 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profiles')
-rw-r--r--chrome/browser/profiles/profile.cc11
-rw-r--r--chrome/browser/profiles/profile_impl.cc11
2 files changed, 12 insertions, 10 deletions
diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc
index f35020c..41e50ad 100644
--- a/chrome/browser/profiles/profile.cc
+++ b/chrome/browser/profiles/profile.cc
@@ -561,11 +561,7 @@ class OffTheRecordProfileImpl : public Profile,
}
virtual WebKitContext* GetWebKitContext() {
- if (!webkit_context_.get()) {
- webkit_context_ = new WebKitContext(
- IsOffTheRecord(), GetPath(), GetExtensionSpecialStoragePolicy(),
- false);
- }
+ CreateQuotaManagerAndClients();
return webkit_context_.get();
}
@@ -690,6 +686,7 @@ class OffTheRecordProfileImpl : public Profile,
if (quota_manager_.get()) {
DCHECK(file_system_context_.get());
DCHECK(db_tracker_.get());
+ DCHECK(webkit_context_.get());
return;
}
@@ -714,6 +711,10 @@ class OffTheRecordProfileImpl : public Profile,
GetPath(), IsOffTheRecord(), GetExtensionSpecialStoragePolicy(),
quota_manager_->proxy(),
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
+ webkit_context_ = new WebKitContext(
+ IsOffTheRecord(), GetPath(), GetExtensionSpecialStoragePolicy(),
+ false, quota_manager_->proxy(),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::WEBKIT));
appcache_service_ = new ChromeAppCacheService(quota_manager_->proxy());
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 2e0396f..669abc9 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -1303,6 +1303,7 @@ void ProfileImpl::CreateQuotaManagerAndClients() {
if (quota_manager_.get()) {
DCHECK(file_system_context_.get());
DCHECK(db_tracker_.get());
+ DCHECK(webkit_context_.get());
return;
}
@@ -1327,6 +1328,10 @@ void ProfileImpl::CreateQuotaManagerAndClients() {
GetPath(), IsOffTheRecord(), GetExtensionSpecialStoragePolicy(),
quota_manager_->proxy(),
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
+ webkit_context_ = new WebKitContext(
+ IsOffTheRecord(), GetPath(), GetExtensionSpecialStoragePolicy(),
+ clear_local_state_on_exit_, quota_manager_->proxy(),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::WEBKIT));
appcache_service_ = new ChromeAppCacheService(quota_manager_->proxy());
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
@@ -1341,11 +1346,7 @@ void ProfileImpl::CreateQuotaManagerAndClients() {
}
WebKitContext* ProfileImpl::GetWebKitContext() {
- if (!webkit_context_.get()) {
- webkit_context_ = new WebKitContext(
- IsOffTheRecord(), GetPath(), GetExtensionSpecialStoragePolicy(),
- clear_local_state_on_exit_);
- }
+ CreateQuotaManagerAndClients();
return webkit_context_.get();
}