summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profiles
diff options
context:
space:
mode:
authordgrogan@chromium.org <dgrogan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-27 20:02:53 +0000
committerdgrogan@chromium.org <dgrogan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-27 20:02:53 +0000
commit55775cc217406277d7591c22f5d7abec91773edc (patch)
tree5816c1ae354507caba99414ba4270d2bf3e0b13a /chrome/browser/profiles
parent2e1bf22cf64866453438d5e46ce42b7c5c4ee49a (diff)
downloadchromium_src-55775cc217406277d7591c22f5d7abec91773edc.zip
chromium_src-55775cc217406277d7591c22f5d7abec91773edc.tar.gz
chromium_src-55775cc217406277d7591c22f5d7abec91773edc.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* Review URL: http://codereview.chromium.org/7053030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87076 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 4f882cb..fbb0f4b 100644
--- a/chrome/browser/profiles/profile.cc
+++ b/chrome/browser/profiles/profile.cc
@@ -565,11 +565,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();
}
@@ -694,6 +690,7 @@ class OffTheRecordProfileImpl : public Profile,
if (quota_manager_.get()) {
DCHECK(file_system_context_.get());
DCHECK(db_tracker_.get());
+ DCHECK(webkit_context_.get());
return;
}
@@ -717,6 +714,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 3ed5116..4780570 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -1306,6 +1306,7 @@ void ProfileImpl::CreateQuotaManagerAndClients() {
if (quota_manager_.get()) {
DCHECK(file_system_context_.get());
DCHECK(db_tracker_.get());
+ DCHECK(webkit_context_.get());
return;
}
@@ -1329,6 +1330,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,
@@ -1343,11 +1348,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();
}