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 <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
| 10 #include "base/location.h" |
10 #include "base/sequenced_task_runner.h" | 11 #include "base/sequenced_task_runner.h" |
| 12 #include "base/single_thread_task_runner.h" |
11 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
12 #include "content/browser/browser_main_loop.h" | 14 #include "content/browser/browser_main_loop.h" |
13 #include "content/browser/fileapi/browser_file_system_helper.h" | 15 #include "content/browser/fileapi/browser_file_system_helper.h" |
14 #include "content/browser/geofencing/geofencing_manager.h" | 16 #include "content/browser/geofencing/geofencing_manager.h" |
15 #include "content/browser/gpu/shader_disk_cache.h" | 17 #include "content/browser/gpu/shader_disk_cache.h" |
16 #include "content/browser/host_zoom_map_impl.h" | 18 #include "content/browser/host_zoom_map_impl.h" |
17 #include "content/browser/navigator_connect/navigator_connect_context_impl.h" | 19 #include "content/browser/navigator_connect/navigator_connect_context_impl.h" |
18 #include "content/browser/navigator_connect/navigator_connect_service_worker_ser
vice_factory.h" | 20 #include "content/browser/navigator_connect/navigator_connect_service_worker_ser
vice_factory.h" |
19 #include "content/browser/notifications/platform_notification_context_impl.h" | 21 #include "content/browser/notifications/platform_notification_context_impl.h" |
20 #include "content/common/dom_storage/dom_storage_types.h" | 22 #include "content/common/dom_storage/dom_storage_types.h" |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 | 479 |
478 base::FilePath path = in_memory ? base::FilePath() : partition_path; | 480 base::FilePath path = in_memory ? base::FilePath() : partition_path; |
479 scoped_refptr<DOMStorageContextWrapper> dom_storage_context = | 481 scoped_refptr<DOMStorageContextWrapper> dom_storage_context = |
480 new DOMStorageContextWrapper(path, context->GetSpecialStoragePolicy()); | 482 new DOMStorageContextWrapper(path, context->GetSpecialStoragePolicy()); |
481 | 483 |
482 // BrowserMainLoop may not be initialized in unit tests. Tests will | 484 // BrowserMainLoop may not be initialized in unit tests. Tests will |
483 // need to inject their own task runner into the IndexedDBContext. | 485 // need to inject their own task runner into the IndexedDBContext. |
484 base::SequencedTaskRunner* idb_task_runner = | 486 base::SequencedTaskRunner* idb_task_runner = |
485 BrowserThread::CurrentlyOn(BrowserThread::UI) && | 487 BrowserThread::CurrentlyOn(BrowserThread::UI) && |
486 BrowserMainLoop::GetInstance() | 488 BrowserMainLoop::GetInstance() |
487 ? BrowserMainLoop::GetInstance()->indexed_db_thread() | 489 ? BrowserMainLoop::GetInstance() |
488 ->message_loop_proxy().get() | 490 ->indexed_db_thread() |
| 491 ->task_runner() |
| 492 .get() |
489 : NULL; | 493 : NULL; |
490 scoped_refptr<IndexedDBContextImpl> indexed_db_context = | 494 scoped_refptr<IndexedDBContextImpl> indexed_db_context = |
491 new IndexedDBContextImpl(path, | 495 new IndexedDBContextImpl(path, |
492 context->GetSpecialStoragePolicy(), | 496 context->GetSpecialStoragePolicy(), |
493 quota_manager->proxy(), | 497 quota_manager->proxy(), |
494 idb_task_runner); | 498 idb_task_runner); |
495 | 499 |
496 scoped_refptr<CacheStorageContextImpl> cache_storage_context = | 500 scoped_refptr<CacheStorageContextImpl> cache_storage_context = |
497 new CacheStorageContextImpl(context); | 501 new CacheStorageContextImpl(context); |
498 cache_storage_context->Init(path, quota_manager->proxy(), | 502 cache_storage_context->Init(path, quota_manager->proxy(), |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
948 net::URLRequestContextGetter* url_request_context) { | 952 net::URLRequestContextGetter* url_request_context) { |
949 url_request_context_ = url_request_context; | 953 url_request_context_ = url_request_context; |
950 } | 954 } |
951 | 955 |
952 void StoragePartitionImpl::SetMediaURLRequestContext( | 956 void StoragePartitionImpl::SetMediaURLRequestContext( |
953 net::URLRequestContextGetter* media_url_request_context) { | 957 net::URLRequestContextGetter* media_url_request_context) { |
954 media_url_request_context_ = media_url_request_context; | 958 media_url_request_context_ = media_url_request_context; |
955 } | 959 } |
956 | 960 |
957 } // namespace content | 961 } // namespace content |
OLD | NEW |