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 "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "content/browser/fileapi/browser_file_system_helper.h" | 8 #include "content/browser/fileapi/browser_file_system_helper.h" |
9 #include "content/browser/gpu/shader_disk_cache.h" | 9 #include "content/browser/gpu/shader_disk_cache.h" |
10 #include "content/public/browser/browser_context.h" | 10 #include "content/public/browser/browser_context.h" |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 scoped_refptr<IndexedDBContextImpl> indexed_db_context = | 224 scoped_refptr<IndexedDBContextImpl> indexed_db_context = |
225 new IndexedDBContextImpl(path, context->GetSpecialStoragePolicy(), | 225 new IndexedDBContextImpl(path, context->GetSpecialStoragePolicy(), |
226 quota_manager->proxy(), | 226 quota_manager->proxy(), |
227 BrowserThread::GetMessageLoopProxyForThread( | 227 BrowserThread::GetMessageLoopProxyForThread( |
228 BrowserThread::WEBKIT_DEPRECATED)); | 228 BrowserThread::WEBKIT_DEPRECATED)); |
229 | 229 |
230 scoped_refptr<ChromeAppCacheService> appcache_service = | 230 scoped_refptr<ChromeAppCacheService> appcache_service = |
231 new ChromeAppCacheService(quota_manager->proxy()); | 231 new ChromeAppCacheService(quota_manager->proxy()); |
232 | 232 |
233 return new StoragePartitionImpl(partition_path, | 233 return new StoragePartitionImpl(partition_path, |
234 quota_manager, | 234 quota_manager.get(), |
235 appcache_service, | 235 appcache_service.get(), |
236 filesystem_context, | 236 filesystem_context.get(), |
237 database_tracker, | 237 database_tracker.get(), |
238 dom_storage_context, | 238 dom_storage_context.get(), |
239 indexed_db_context); | 239 indexed_db_context.get()); |
240 } | 240 } |
241 | 241 |
242 base::FilePath StoragePartitionImpl::GetPath() { | 242 base::FilePath StoragePartitionImpl::GetPath() { |
243 return partition_path_; | 243 return partition_path_; |
244 } | 244 } |
245 | 245 |
246 net::URLRequestContextGetter* StoragePartitionImpl::GetURLRequestContext() { | 246 net::URLRequestContextGetter* StoragePartitionImpl::GetURLRequestContext() { |
247 return url_request_context_; | 247 return url_request_context_.get(); |
248 } | 248 } |
249 | 249 |
250 net::URLRequestContextGetter* | 250 net::URLRequestContextGetter* |
251 StoragePartitionImpl::GetMediaURLRequestContext() { | 251 StoragePartitionImpl::GetMediaURLRequestContext() { |
252 return media_url_request_context_; | 252 return media_url_request_context_.get(); |
253 } | 253 } |
254 | 254 |
255 quota::QuotaManager* StoragePartitionImpl::GetQuotaManager() { | 255 quota::QuotaManager* StoragePartitionImpl::GetQuotaManager() { |
256 return quota_manager_; | 256 return quota_manager_.get(); |
257 } | 257 } |
258 | 258 |
259 ChromeAppCacheService* StoragePartitionImpl::GetAppCacheService() { | 259 ChromeAppCacheService* StoragePartitionImpl::GetAppCacheService() { |
260 return appcache_service_; | 260 return appcache_service_.get(); |
261 } | 261 } |
262 | 262 |
263 fileapi::FileSystemContext* StoragePartitionImpl::GetFileSystemContext() { | 263 fileapi::FileSystemContext* StoragePartitionImpl::GetFileSystemContext() { |
264 return filesystem_context_; | 264 return filesystem_context_.get(); |
265 } | 265 } |
266 | 266 |
267 webkit_database::DatabaseTracker* StoragePartitionImpl::GetDatabaseTracker() { | 267 webkit_database::DatabaseTracker* StoragePartitionImpl::GetDatabaseTracker() { |
268 return database_tracker_; | 268 return database_tracker_.get(); |
269 } | 269 } |
270 | 270 |
271 DOMStorageContextImpl* StoragePartitionImpl::GetDOMStorageContext() { | 271 DOMStorageContextImpl* StoragePartitionImpl::GetDOMStorageContext() { |
272 return dom_storage_context_; | 272 return dom_storage_context_.get(); |
273 } | 273 } |
274 | 274 |
275 IndexedDBContextImpl* StoragePartitionImpl::GetIndexedDBContext() { | 275 IndexedDBContextImpl* StoragePartitionImpl::GetIndexedDBContext() { |
276 return indexed_db_context_; | 276 return indexed_db_context_.get(); |
277 } | 277 } |
278 | 278 |
279 void StoragePartitionImpl::AsyncClearDataForOrigin( | 279 void StoragePartitionImpl::AsyncClearDataForOrigin( |
280 uint32 storage_mask, | 280 uint32 storage_mask, |
281 const GURL& storage_origin, | 281 const GURL& storage_origin, |
282 net::URLRequestContextGetter* request_context_getter) { | 282 net::URLRequestContextGetter* request_context_getter) { |
283 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 283 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
284 | 284 |
285 BrowserThread::PostTask( | 285 BrowserThread::PostTask( |
286 BrowserThread::IO, FROM_HERE, | 286 BrowserThread::IO, FROM_HERE, |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 net::URLRequestContextGetter* url_request_context) { | 335 net::URLRequestContextGetter* url_request_context) { |
336 url_request_context_ = url_request_context; | 336 url_request_context_ = url_request_context; |
337 } | 337 } |
338 | 338 |
339 void StoragePartitionImpl::SetMediaURLRequestContext( | 339 void StoragePartitionImpl::SetMediaURLRequestContext( |
340 net::URLRequestContextGetter* media_url_request_context) { | 340 net::URLRequestContextGetter* media_url_request_context) { |
341 media_url_request_context_ = media_url_request_context; | 341 media_url_request_context_ = media_url_request_context; |
342 } | 342 } |
343 | 343 |
344 } // namespace content | 344 } // namespace content |
OLD | NEW |