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

Side by Side Diff: content/browser/browser_context.cc

Issue 10916132: AppCache and StoragePartition'ing (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/public/browser/browser_context.h" 5 #include "content/public/browser/browser_context.h"
6 6
7 #include "content/browser/appcache/chrome_appcache_service.h" 7 #include "content/browser/appcache/chrome_appcache_service.h"
8 #include "webkit/database/database_tracker.h" 8 #include "webkit/database/database_tracker.h"
9 #include "content/browser/dom_storage/dom_storage_context_impl.h" 9 #include "content/browser/dom_storage/dom_storage_context_impl.h"
10 #include "content/browser/download/download_file_manager.h" 10 #include "content/browser/download/download_file_manager.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 context, kDownloadManagerKeyName); 103 context, kDownloadManagerKeyName);
104 } 104 }
105 105
106 IndexedDBContext* BrowserContext::GetIndexedDBContext( 106 IndexedDBContext* BrowserContext::GetIndexedDBContext(
107 BrowserContext* browser_context) { 107 BrowserContext* browser_context) {
108 // TODO(ajwong): Change this API to require a SiteInstance instead of 108 // TODO(ajwong): Change this API to require a SiteInstance instead of
109 // using GetDefaultStoragePartition(). 109 // using GetDefaultStoragePartition().
110 return GetDefaultStoragePartition(browser_context)->GetIndexedDBContext(); 110 return GetDefaultStoragePartition(browser_context)->GetIndexedDBContext();
111 } 111 }
112 112
113 appcache::AppCacheService* BrowserContext::GetAppCacheService(
114 BrowserContext* browser_context) {
115 // TODO(ajwong): Change this API to require a SiteInstance instead of
116 // using GetDefaultStoragePartition().
117 return GetDefaultStoragePartition(browser_context)->GetAppCacheService();
118 }
119
120 fileapi::FileSystemContext* BrowserContext::GetFileSystemContext( 113 fileapi::FileSystemContext* BrowserContext::GetFileSystemContext(
121 BrowserContext* browser_context) { 114 BrowserContext* browser_context) {
122 // TODO(ajwong): Change this API to require a SiteInstance instead of 115 // TODO(ajwong): Change this API to require a SiteInstance instead of
123 // using GetDefaultStoragePartition(). 116 // using GetDefaultStoragePartition().
124 return GetDefaultStoragePartition(browser_context)->GetFileSystemContext(); 117 return GetDefaultStoragePartition(browser_context)->GetFileSystemContext();
125 } 118 }
126 119
127 StoragePartition* BrowserContext::GetStoragePartition( 120 StoragePartition* BrowserContext::GetStoragePartition(
128 BrowserContext* browser_context, 121 BrowserContext* browser_context,
129 SiteInstance* site_instance) { 122 SiteInstance* site_instance) {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 ForEachStoragePartition(browser_context, 212 ForEachStoragePartition(browser_context,
220 base::Bind(&PurgeDOMStorageContextInPartition)); 213 base::Bind(&PurgeDOMStorageContextInPartition));
221 } 214 }
222 215
223 BrowserContext::~BrowserContext() { 216 BrowserContext::~BrowserContext() {
224 if (GetUserData(kDownloadManagerKeyName)) 217 if (GetUserData(kDownloadManagerKeyName))
225 GetDownloadManager(this)->Shutdown(); 218 GetDownloadManager(this)->Shutdown();
226 } 219 }
227 220
228 } // namespace content 221 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698