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/worker_host/worker_storage_partition.h" | 5 #include "content/browser/worker_host/worker_storage_partition.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "content/browser/appcache/chrome_appcache_service.h" | 9 #include "content/browser/appcache/chrome_appcache_service.h" |
10 #include "content/browser/in_process_webkit/indexed_db_context_impl.h" | 10 #include "content/browser/in_process_webkit/indexed_db_context_impl.h" |
11 #include "net/url_request/url_request_context_getter.h" | |
11 #include "webkit/database/database_tracker.h" | 12 #include "webkit/database/database_tracker.h" |
12 #include "webkit/fileapi/file_system_context.h" | 13 #include "webkit/fileapi/file_system_context.h" |
13 | 14 |
15 // TODO(ajwong): Handle MediaUrlRequestContext? | |
michaeln
2012/09/15 01:48:33
Is this TODO intentional, seems like its handled i
awong
2012/09/15 02:05:02
It was stale. removed.
| |
14 WorkerStoragePartition::WorkerStoragePartition( | 16 WorkerStoragePartition::WorkerStoragePartition( |
17 net::URLRequestContextGetter* url_request_context, | |
18 net::URLRequestContextGetter* media_url_request_context, | |
15 ChromeAppCacheService* appcache_service, | 19 ChromeAppCacheService* appcache_service, |
16 fileapi::FileSystemContext* filesystem_context, | 20 fileapi::FileSystemContext* filesystem_context, |
17 webkit_database::DatabaseTracker* database_tracker, | 21 webkit_database::DatabaseTracker* database_tracker, |
18 IndexedDBContextImpl* indexed_db_context) | 22 IndexedDBContextImpl* indexed_db_context) |
19 : appcache_service_(appcache_service), | 23 : url_request_context_(url_request_context), |
24 media_url_request_context_(media_url_request_context), | |
25 appcache_service_(appcache_service), | |
20 filesystem_context_(filesystem_context), | 26 filesystem_context_(filesystem_context), |
21 database_tracker_(database_tracker), | 27 database_tracker_(database_tracker), |
22 indexed_db_context_(indexed_db_context) { | 28 indexed_db_context_(indexed_db_context) { |
23 } | 29 } |
24 | 30 |
25 WorkerStoragePartition::WorkerStoragePartition( | 31 WorkerStoragePartition::WorkerStoragePartition( |
26 const WorkerStoragePartition& other) { | 32 const WorkerStoragePartition& other) { |
27 Copy(other); | 33 Copy(other); |
28 } | 34 } |
29 | 35 |
30 const WorkerStoragePartition& WorkerStoragePartition::operator=( | 36 const WorkerStoragePartition& WorkerStoragePartition::operator=( |
31 const WorkerStoragePartition& rhs) { | 37 const WorkerStoragePartition& rhs) { |
32 Copy(rhs); | 38 Copy(rhs); |
33 return *this; | 39 return *this; |
34 } | 40 } |
35 | 41 |
36 bool WorkerStoragePartition::Equals( | 42 bool WorkerStoragePartition::Equals( |
37 const WorkerStoragePartition& other) const { | 43 const WorkerStoragePartition& other) const { |
38 return appcache_service_ == other.appcache_service_ && | 44 return url_request_context_ == other.url_request_context_ && |
45 media_url_request_context_ == other.media_url_request_context_ && | |
46 appcache_service_ == other.appcache_service_ && | |
39 filesystem_context_ == other.filesystem_context_ && | 47 filesystem_context_ == other.filesystem_context_ && |
40 database_tracker_ == other.database_tracker_ && | 48 database_tracker_ == other.database_tracker_ && |
41 indexed_db_context_ == other.indexed_db_context_; | 49 indexed_db_context_ == other.indexed_db_context_; |
42 } | 50 } |
43 | 51 |
44 WorkerStoragePartition::~WorkerStoragePartition() { | 52 WorkerStoragePartition::~WorkerStoragePartition() { |
45 } | 53 } |
46 | 54 |
47 void WorkerStoragePartition::Copy(const WorkerStoragePartition& other) { | 55 void WorkerStoragePartition::Copy(const WorkerStoragePartition& other) { |
56 url_request_context_ = other.url_request_context_; | |
57 media_url_request_context_ = other.media_url_request_context_; | |
48 appcache_service_ = other.appcache_service_; | 58 appcache_service_ = other.appcache_service_; |
49 filesystem_context_ = other.filesystem_context_; | 59 filesystem_context_ = other.filesystem_context_; |
50 database_tracker_ = other.database_tracker_; | 60 database_tracker_ = other.database_tracker_; |
51 indexed_db_context_ = other.indexed_db_context_; | 61 indexed_db_context_ = other.indexed_db_context_; |
52 } | 62 } |
OLD | NEW |