| 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/browser/storage_partition_impl.h" | 5 #include "content/browser/storage_partition_impl.h" | 
| 6 | 6 | 
| 7 #include "content/browser/fileapi/browser_file_system_helper.h" | 7 #include "content/browser/fileapi/browser_file_system_helper.h" | 
| 8 #include "content/public/browser/browser_context.h" | 8 #include "content/public/browser/browser_context.h" | 
| 9 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" | 
|  | 10 #include "net/url_request/url_request_context_getter.h" | 
| 10 #include "webkit/database/database_tracker.h" | 11 #include "webkit/database/database_tracker.h" | 
| 11 #include "webkit/quota/quota_manager.h" | 12 #include "webkit/quota/quota_manager.h" | 
| 12 | 13 | 
| 13 namespace content { | 14 namespace content { | 
| 14 | 15 | 
| 15 namespace { | 16 namespace { | 
| 16 | 17 | 
| 17 // These constants are used to create the directory structure under the profile | 18 // These constants are used to create the directory structure under the profile | 
| 18 // where renderers with a non-default storage partition keep their persistent | 19 // where renderers with a non-default storage partition keep their persistent | 
| 19 // state. This will contain a set of directories that partially mirror the | 20 // state. This will contain a set of directories that partially mirror the | 
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 140                                   filesystem_context, | 141                                   filesystem_context, | 
| 141                                   database_tracker, | 142                                   database_tracker, | 
| 142                                   dom_storage_context, | 143                                   dom_storage_context, | 
| 143                                   indexed_db_context); | 144                                   indexed_db_context); | 
| 144 } | 145 } | 
| 145 | 146 | 
| 146 FilePath StoragePartitionImpl::GetPath() { | 147 FilePath StoragePartitionImpl::GetPath() { | 
| 147   return partition_path_; | 148   return partition_path_; | 
| 148 } | 149 } | 
| 149 | 150 | 
|  | 151 net::URLRequestContextGetter* StoragePartitionImpl::GetURLRequestContext() { | 
|  | 152   return url_request_context_; | 
|  | 153 } | 
|  | 154 | 
|  | 155 net::URLRequestContextGetter* | 
|  | 156 StoragePartitionImpl::GetMediaURLRequestContext() { | 
|  | 157   return media_url_request_context_; | 
|  | 158 } | 
|  | 159 | 
| 150 quota::QuotaManager* StoragePartitionImpl::GetQuotaManager() { | 160 quota::QuotaManager* StoragePartitionImpl::GetQuotaManager() { | 
| 151   return quota_manager_; | 161   return quota_manager_; | 
| 152 } | 162 } | 
| 153 | 163 | 
| 154 ChromeAppCacheService* StoragePartitionImpl::GetAppCacheService() { | 164 ChromeAppCacheService* StoragePartitionImpl::GetAppCacheService() { | 
| 155   return appcache_service_; | 165   return appcache_service_; | 
| 156 } | 166 } | 
| 157 | 167 | 
| 158 fileapi::FileSystemContext* StoragePartitionImpl::GetFileSystemContext() { | 168 fileapi::FileSystemContext* StoragePartitionImpl::GetFileSystemContext() { | 
| 159   return filesystem_context_; | 169   return filesystem_context_; | 
| 160 } | 170 } | 
| 161 | 171 | 
| 162 webkit_database::DatabaseTracker* StoragePartitionImpl::GetDatabaseTracker() { | 172 webkit_database::DatabaseTracker* StoragePartitionImpl::GetDatabaseTracker() { | 
| 163   return database_tracker_; | 173   return database_tracker_; | 
| 164 } | 174 } | 
| 165 | 175 | 
| 166 DOMStorageContextImpl* StoragePartitionImpl::GetDOMStorageContext() { | 176 DOMStorageContextImpl* StoragePartitionImpl::GetDOMStorageContext() { | 
| 167   return dom_storage_context_; | 177   return dom_storage_context_; | 
| 168 } | 178 } | 
| 169 | 179 | 
| 170 IndexedDBContextImpl* StoragePartitionImpl::GetIndexedDBContext() { | 180 IndexedDBContextImpl* StoragePartitionImpl::GetIndexedDBContext() { | 
| 171   return indexed_db_context_; | 181   return indexed_db_context_; | 
| 172 } | 182 } | 
| 173 | 183 | 
|  | 184 void StoragePartitionImpl::SetURLRequestContext( | 
|  | 185     net::URLRequestContextGetter* url_request_context) { | 
|  | 186   url_request_context_ = url_request_context; | 
|  | 187 } | 
|  | 188 | 
|  | 189 void StoragePartitionImpl::SetMediaURLRequestContext( | 
|  | 190     net::URLRequestContextGetter* media_url_request_context) { | 
|  | 191   media_url_request_context_ = media_url_request_context; | 
|  | 192 } | 
|  | 193 | 
| 174 }  // namespace content | 194 }  // namespace content | 
| OLD | NEW | 
|---|