OLD | NEW |
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 context, kDownloadManagerKeyName); | 102 context, kDownloadManagerKeyName); |
103 } | 103 } |
104 | 104 |
105 IndexedDBContext* BrowserContext::GetIndexedDBContext( | 105 IndexedDBContext* BrowserContext::GetIndexedDBContext( |
106 BrowserContext* browser_context) { | 106 BrowserContext* browser_context) { |
107 // TODO(ajwong): Change this API to require a SiteInstance instead of | 107 // TODO(ajwong): Change this API to require a SiteInstance instead of |
108 // using GetDefaultStoragePartition(). | 108 // using GetDefaultStoragePartition(). |
109 return GetDefaultStoragePartition(browser_context)->GetIndexedDBContext(); | 109 return GetDefaultStoragePartition(browser_context)->GetIndexedDBContext(); |
110 } | 110 } |
111 | 111 |
112 appcache::AppCacheService* BrowserContext::GetAppCacheService( | |
113 BrowserContext* browser_context) { | |
114 // TODO(ajwong): Change this API to require a SiteInstance instead of | |
115 // using GetDefaultStoragePartition(). | |
116 return GetDefaultStoragePartition(browser_context)->GetAppCacheService(); | |
117 } | |
118 | |
119 fileapi::FileSystemContext* BrowserContext::GetFileSystemContext( | 112 fileapi::FileSystemContext* BrowserContext::GetFileSystemContext( |
120 BrowserContext* browser_context) { | 113 BrowserContext* browser_context) { |
121 // TODO(ajwong): Change this API to require a SiteInstance instead of | 114 // TODO(ajwong): Change this API to require a SiteInstance instead of |
122 // using GetDefaultStoragePartition(). | 115 // using GetDefaultStoragePartition(). |
123 return GetDefaultStoragePartition(browser_context)->GetFileSystemContext(); | 116 return GetDefaultStoragePartition(browser_context)->GetFileSystemContext(); |
124 } | 117 } |
125 | 118 |
126 StoragePartition* BrowserContext::GetStoragePartition( | 119 StoragePartition* BrowserContext::GetStoragePartition( |
127 BrowserContext* browser_context, | 120 BrowserContext* browser_context, |
128 SiteInstance* site_instance) { | 121 SiteInstance* site_instance) { |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 ForEachStoragePartition(browser_context, | 203 ForEachStoragePartition(browser_context, |
211 base::Bind(&PurgeDOMStorageContextInPartition)); | 204 base::Bind(&PurgeDOMStorageContextInPartition)); |
212 } | 205 } |
213 | 206 |
214 BrowserContext::~BrowserContext() { | 207 BrowserContext::~BrowserContext() { |
215 if (GetUserData(kDownloadManagerKeyName)) | 208 if (GetUserData(kDownloadManagerKeyName)) |
216 GetDownloadManager(this)->Shutdown(); | 209 GetDownloadManager(this)->Shutdown(); |
217 } | 210 } |
218 | 211 |
219 } // namespace content | 212 } // namespace content |
OLD | NEW |