| 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/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "content/browser/browser_main_loop.h" |
| 8 #include "content/browser/fileapi/browser_file_system_helper.h" | 9 #include "content/browser/fileapi/browser_file_system_helper.h" |
| 9 #include "content/browser/gpu/shader_disk_cache.h" | 10 #include "content/browser/gpu/shader_disk_cache.h" |
| 11 #include "content/browser/indexed_db/indexed_db_thread.h" |
| 10 #include "content/public/browser/browser_context.h" | 12 #include "content/public/browser/browser_context.h" |
| 11 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
| 12 #include "content/public/browser/dom_storage_context.h" | 14 #include "content/public/browser/dom_storage_context.h" |
| 13 #include "content/public/browser/indexed_db_context.h" | 15 #include "content/public/browser/indexed_db_context.h" |
| 14 #include "net/base/completion_callback.h" | 16 #include "net/base/completion_callback.h" |
| 15 #include "net/base/net_errors.h" | 17 #include "net/base/net_errors.h" |
| 16 #include "net/cookies/cookie_monster.h" | 18 #include "net/cookies/cookie_monster.h" |
| 17 #include "net/url_request/url_request_context.h" | 19 #include "net/url_request/url_request_context.h" |
| 18 #include "net/url_request/url_request_context_getter.h" | 20 #include "net/url_request/url_request_context_getter.h" |
| 19 #include "webkit/browser/database/database_tracker.h" | 21 #include "webkit/browser/database/database_tracker.h" |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 in_memory, | 219 in_memory, |
| 218 context->GetSpecialStoragePolicy(), | 220 context->GetSpecialStoragePolicy(), |
| 219 quota_manager->proxy(), | 221 quota_manager->proxy(), |
| 220 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE) | 222 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE) |
| 221 .get()); | 223 .get()); |
| 222 | 224 |
| 223 base::FilePath path = in_memory ? base::FilePath() : partition_path; | 225 base::FilePath path = in_memory ? base::FilePath() : partition_path; |
| 224 scoped_refptr<DOMStorageContextImpl> dom_storage_context = | 226 scoped_refptr<DOMStorageContextImpl> dom_storage_context = |
| 225 new DOMStorageContextImpl(path, context->GetSpecialStoragePolicy()); | 227 new DOMStorageContextImpl(path, context->GetSpecialStoragePolicy()); |
| 226 | 228 |
| 229 IndexedDBThread* idb_thread = BrowserMainLoop::GetIndexedDBThread(); |
| 227 scoped_refptr<IndexedDBContextImpl> indexed_db_context = | 230 scoped_refptr<IndexedDBContextImpl> indexed_db_context = |
| 228 new IndexedDBContextImpl(path, | 231 new IndexedDBContextImpl( |
| 229 context->GetSpecialStoragePolicy(), | 232 path, |
| 230 quota_manager->proxy(), | 233 context->GetSpecialStoragePolicy(), |
| 231 BrowserThread::GetMessageLoopProxyForThread( | 234 quota_manager->proxy(), |
| 232 BrowserThread::WEBKIT_DEPRECATED).get()); | 235 idb_thread ? idb_thread->thread()->message_loop() : NULL); |
| 233 | 236 |
| 234 scoped_refptr<ChromeAppCacheService> appcache_service = | 237 scoped_refptr<ChromeAppCacheService> appcache_service = |
| 235 new ChromeAppCacheService(quota_manager->proxy()); | 238 new ChromeAppCacheService(quota_manager->proxy()); |
| 236 | 239 |
| 237 return new StoragePartitionImpl(partition_path, | 240 return new StoragePartitionImpl(partition_path, |
| 238 quota_manager.get(), | 241 quota_manager.get(), |
| 239 appcache_service.get(), | 242 appcache_service.get(), |
| 240 filesystem_context.get(), | 243 filesystem_context.get(), |
| 241 database_tracker.get(), | 244 database_tracker.get(), |
| 242 dom_storage_context.get(), | 245 dom_storage_context.get(), |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 net::URLRequestContextGetter* url_request_context) { | 342 net::URLRequestContextGetter* url_request_context) { |
| 340 url_request_context_ = url_request_context; | 343 url_request_context_ = url_request_context; |
| 341 } | 344 } |
| 342 | 345 |
| 343 void StoragePartitionImpl::SetMediaURLRequestContext( | 346 void StoragePartitionImpl::SetMediaURLRequestContext( |
| 344 net::URLRequestContextGetter* media_url_request_context) { | 347 net::URLRequestContextGetter* media_url_request_context) { |
| 345 media_url_request_context_ = media_url_request_context; | 348 media_url_request_context_ = media_url_request_context; |
| 346 } | 349 } |
| 347 | 350 |
| 348 } // namespace content | 351 } // namespace content |
| OLD | NEW |