OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/browser/worker_host/worker_storage_partition.h" |
| 6 |
| 7 #include <string> |
| 8 |
| 9 #include "content/browser/appcache/chrome_appcache_service.h" |
| 10 #include "content/browser/in_process_webkit/indexed_db_context_impl.h" |
| 11 #include "webkit/database/database_tracker.h" |
| 12 #include "webkit/fileapi/file_system_context.h" |
| 13 |
| 14 WorkerStoragePartition::WorkerStoragePartition( |
| 15 ChromeAppCacheService* appcache_service, |
| 16 fileapi::FileSystemContext* filesystem_context, |
| 17 webkit_database::DatabaseTracker* database_tracker, |
| 18 IndexedDBContextImpl* indexed_db_context) |
| 19 : appcache_service_(appcache_service), |
| 20 filesystem_context_(filesystem_context), |
| 21 database_tracker_(database_tracker), |
| 22 indexed_db_context_(indexed_db_context) { |
| 23 } |
| 24 |
| 25 WorkerStoragePartition::WorkerStoragePartition( |
| 26 const WorkerStoragePartition& other) { |
| 27 Copy(other); |
| 28 } |
| 29 |
| 30 const WorkerStoragePartition& WorkerStoragePartition::operator=( |
| 31 const WorkerStoragePartition& rhs) { |
| 32 Copy(rhs); |
| 33 return *this; |
| 34 } |
| 35 |
| 36 bool WorkerStoragePartition::Equals( |
| 37 const WorkerStoragePartition& other) const { |
| 38 return appcache_service_ == other.appcache_service_ && |
| 39 filesystem_context_ == other.filesystem_context_ && |
| 40 database_tracker_ == other.database_tracker_ && |
| 41 indexed_db_context_ == other.indexed_db_context_; |
| 42 } |
| 43 |
| 44 WorkerStoragePartition::~WorkerStoragePartition() { |
| 45 } |
| 46 |
| 47 void WorkerStoragePartition::Copy(const WorkerStoragePartition& other) { |
| 48 appcache_service_ = other.appcache_service_; |
| 49 filesystem_context_ = other.filesystem_context_; |
| 50 database_tracker_ = other.database_tracker_; |
| 51 indexed_db_context_ = other.indexed_db_context_; |
| 52 } |
OLD | NEW |