summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profile.cc
diff options
context:
space:
mode:
authormichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-11 20:47:32 +0000
committermichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-11 20:47:32 +0000
commit02a5cdbe64dc598efaa25b06a8de02ffe8ea676b (patch)
treee7a04cc50318e21d72109f40f57d1add8de50d21 /chrome/browser/profile.cc
parentb2471359cfbd4f7b9621ba2542b947841bfadb27 (diff)
downloadchromium_src-02a5cdbe64dc598efaa25b06a8de02ffe8ea676b.zip
chromium_src-02a5cdbe64dc598efaa25b06a8de02ffe8ea676b.tar.gz
chromium_src-02a5cdbe64dc598efaa25b06a8de02ffe8ea676b.tar.bz2
Provide a profile.GetAppCacheService() accessor and add two helper methods to ChromeAppCacheService to override the default quota for an origin.
BUG=49993 TESTS=existing tests apply Review URL: http://codereview.chromium.org/2819091 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55773 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profile.cc')
-rw-r--r--chrome/browser/profile.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index 7b3f7d2..26392e8 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -168,6 +168,19 @@ class OffTheRecordProfileImpl : public Profile,
return profile_;
}
+ virtual ChromeAppCacheService* GetAppCacheService() {
+ if (!appcache_service_) {
+ appcache_service_ = new ChromeAppCacheService;
+ ChromeThread::PostTask(
+ ChromeThread::IO, FROM_HERE,
+ NewRunnableMethod(appcache_service_.get(),
+ &ChromeAppCacheService::InitializeOnIOThread,
+ GetPath(), IsOffTheRecord(),
+ make_scoped_refptr(GetHostContentSettingsMap())));
+ }
+ return appcache_service_;
+ }
+
virtual webkit_database::DatabaseTracker* GetDatabaseTracker() {
if (!db_tracker_) {
db_tracker_ = new webkit_database::DatabaseTracker(
@@ -531,6 +544,8 @@ class OffTheRecordProfileImpl : public Profile,
// Time we were started.
Time start_time_;
+ scoped_refptr<ChromeAppCacheService> appcache_service_;
+
// The main database tracker for this profile.
// Should be used only on the file thread.
scoped_refptr<webkit_database::DatabaseTracker> db_tracker_;