| 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 |
| 14 WorkerStoragePartition::WorkerStoragePartition( | 15 WorkerStoragePartition::WorkerStoragePartition( |
| 16 net::URLRequestContextGetter* url_request_context, |
| 17 net::URLRequestContextGetter* media_url_request_context, |
| 15 ChromeAppCacheService* appcache_service, | 18 ChromeAppCacheService* appcache_service, |
| 16 fileapi::FileSystemContext* filesystem_context, | 19 fileapi::FileSystemContext* filesystem_context, |
| 17 webkit_database::DatabaseTracker* database_tracker, | 20 webkit_database::DatabaseTracker* database_tracker, |
| 18 IndexedDBContextImpl* indexed_db_context) | 21 IndexedDBContextImpl* indexed_db_context) |
| 19 : appcache_service_(appcache_service), | 22 : url_request_context_(url_request_context), |
| 23 media_url_request_context_(media_url_request_context), |
| 24 appcache_service_(appcache_service), |
| 20 filesystem_context_(filesystem_context), | 25 filesystem_context_(filesystem_context), |
| 21 database_tracker_(database_tracker), | 26 database_tracker_(database_tracker), |
| 22 indexed_db_context_(indexed_db_context) { | 27 indexed_db_context_(indexed_db_context) { |
| 23 } | 28 } |
| 24 | 29 |
| 25 WorkerStoragePartition::WorkerStoragePartition( | 30 WorkerStoragePartition::WorkerStoragePartition( |
| 26 const WorkerStoragePartition& other) { | 31 const WorkerStoragePartition& other) { |
| 27 Copy(other); | 32 Copy(other); |
| 28 } | 33 } |
| 29 | 34 |
| 30 const WorkerStoragePartition& WorkerStoragePartition::operator=( | 35 const WorkerStoragePartition& WorkerStoragePartition::operator=( |
| 31 const WorkerStoragePartition& rhs) { | 36 const WorkerStoragePartition& rhs) { |
| 32 Copy(rhs); | 37 Copy(rhs); |
| 33 return *this; | 38 return *this; |
| 34 } | 39 } |
| 35 | 40 |
| 36 bool WorkerStoragePartition::Equals( | 41 bool WorkerStoragePartition::Equals( |
| 37 const WorkerStoragePartition& other) const { | 42 const WorkerStoragePartition& other) const { |
| 38 return appcache_service_ == other.appcache_service_ && | 43 return url_request_context_ == other.url_request_context_ && |
| 44 media_url_request_context_ == other.media_url_request_context_ && |
| 45 appcache_service_ == other.appcache_service_ && |
| 39 filesystem_context_ == other.filesystem_context_ && | 46 filesystem_context_ == other.filesystem_context_ && |
| 40 database_tracker_ == other.database_tracker_ && | 47 database_tracker_ == other.database_tracker_ && |
| 41 indexed_db_context_ == other.indexed_db_context_; | 48 indexed_db_context_ == other.indexed_db_context_; |
| 42 } | 49 } |
| 43 | 50 |
| 44 WorkerStoragePartition::~WorkerStoragePartition() { | 51 WorkerStoragePartition::~WorkerStoragePartition() { |
| 45 } | 52 } |
| 46 | 53 |
| 47 void WorkerStoragePartition::Copy(const WorkerStoragePartition& other) { | 54 void WorkerStoragePartition::Copy(const WorkerStoragePartition& other) { |
| 55 url_request_context_ = other.url_request_context_; |
| 56 media_url_request_context_ = other.media_url_request_context_; |
| 48 appcache_service_ = other.appcache_service_; | 57 appcache_service_ = other.appcache_service_; |
| 49 filesystem_context_ = other.filesystem_context_; | 58 filesystem_context_ = other.filesystem_context_; |
| 50 database_tracker_ = other.database_tracker_; | 59 database_tracker_ = other.database_tracker_; |
| 51 indexed_db_context_ = other.indexed_db_context_; | 60 indexed_db_context_ = other.indexed_db_context_; |
| 52 } | 61 } |
| OLD | NEW |