Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Unified Diff: content/browser/worker_host/worker_storage_partition.cc

Issue 10885044: Remove storage context accessors from ResourceContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 80-chars Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/worker_host/worker_storage_partition.cc
diff --git a/content/browser/worker_host/worker_storage_partition.cc b/content/browser/worker_host/worker_storage_partition.cc
new file mode 100644
index 0000000000000000000000000000000000000000..c253d72c9d06320b586dd0f1fa5082a667a9b6cb
--- /dev/null
+++ b/content/browser/worker_host/worker_storage_partition.cc
@@ -0,0 +1,52 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/browser/worker_host/worker_storage_partition.h"
+
+#include <string>
+
+#include "content/browser/appcache/chrome_appcache_service.h"
+#include "content/browser/in_process_webkit/indexed_db_context_impl.h"
+#include "webkit/database/database_tracker.h"
+#include "webkit/fileapi/file_system_context.h"
+
+WorkerStoragePartition::WorkerStoragePartition(
+ ChromeAppCacheService* appcache_service,
+ fileapi::FileSystemContext* filesystem_context,
+ webkit_database::DatabaseTracker* database_tracker,
+ IndexedDBContextImpl* indexed_db_context)
+ : appcache_service_(appcache_service),
+ filesystem_context_(filesystem_context),
+ database_tracker_(database_tracker),
+ indexed_db_context_(indexed_db_context) {
+}
+
+WorkerStoragePartition::WorkerStoragePartition(
+ const WorkerStoragePartition& other) {
+ Copy(other);
+}
+
+const WorkerStoragePartition& WorkerStoragePartition::operator=(
+ const WorkerStoragePartition& rhs) {
+ Copy(rhs);
+ return *this;
+}
+
+bool WorkerStoragePartition::Equals(
+ const WorkerStoragePartition& other) const {
+ return appcache_service_ == other.appcache_service_ &&
+ filesystem_context_ == other.filesystem_context_ &&
+ database_tracker_ == other.database_tracker_ &&
+ indexed_db_context_ == other.indexed_db_context_;
+}
+
+WorkerStoragePartition::~WorkerStoragePartition() {
+}
+
+void WorkerStoragePartition::Copy(const WorkerStoragePartition& other) {
+ appcache_service_ = other.appcache_service_;
+ filesystem_context_ = other.filesystem_context_;
+ database_tracker_ = other.database_tracker_;
+ indexed_db_context_ = other.indexed_db_context_;
+}

Powered by Google App Engine
This is Rietveld 408576698