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

Side by Side Diff: content/browser/worker_host/worker_storage_partition.cc

Issue 258513002: Introduce WorkerStoragePartitionId and use it in SharedWorkerInstance. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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 unified diff | Download patch
OLDNEW
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/indexed_db/indexed_db_context_impl.h" 10 #include "content/browser/indexed_db/indexed_db_context_impl.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 url_request_context_ = other.url_request_context_; 66 url_request_context_ = other.url_request_context_;
67 media_url_request_context_ = other.media_url_request_context_; 67 media_url_request_context_ = other.media_url_request_context_;
68 appcache_service_ = other.appcache_service_; 68 appcache_service_ = other.appcache_service_;
69 quota_manager_ = other.quota_manager_; 69 quota_manager_ = other.quota_manager_;
70 filesystem_context_ = other.filesystem_context_; 70 filesystem_context_ = other.filesystem_context_;
71 database_tracker_ = other.database_tracker_; 71 database_tracker_ = other.database_tracker_;
72 indexed_db_context_ = other.indexed_db_context_; 72 indexed_db_context_ = other.indexed_db_context_;
73 service_worker_context_ = other.service_worker_context_; 73 service_worker_context_ = other.service_worker_context_;
74 } 74 }
75 75
76 WorkerStoragePartitionId::WorkerStoragePartitionId(
77 const WorkerStoragePartition& partition)
78 : url_request_context_(partition.url_request_context()),
79 media_url_request_context_(partition.media_url_request_context()),
80 appcache_service_(partition.appcache_service()),
81 quota_manager_(partition.quota_manager()),
82 filesystem_context_(partition.filesystem_context()),
83 database_tracker_(partition.database_tracker()),
84 indexed_db_context_(partition.indexed_db_context()),
85 service_worker_context_(partition.service_worker_context()) {
86 }
87
88 WorkerStoragePartitionId::WorkerStoragePartitionId(
89 const WorkerStoragePartitionId& other) {
90 Copy(other);
91 }
92
93 const WorkerStoragePartitionId& WorkerStoragePartitionId::operator=(
94 const WorkerStoragePartitionId& rhs) {
95 Copy(rhs);
96 return *this;
97 }
98
99 WorkerStoragePartitionId::~WorkerStoragePartitionId() {
100 }
101
102 void WorkerStoragePartitionId::Copy(const WorkerStoragePartitionId& other) {
103 url_request_context_ = other.url_request_context_;
104 media_url_request_context_ = other.media_url_request_context_;
105 appcache_service_ = other.appcache_service_;
106 quota_manager_ = other.quota_manager_;
107 filesystem_context_ = other.filesystem_context_;
108 database_tracker_ = other.database_tracker_;
109 indexed_db_context_ = other.indexed_db_context_;
110 service_worker_context_ = other.service_worker_context_;
111 }
112
113 bool WorkerStoragePartitionId::Equals(
114 const WorkerStoragePartitionId& other) const {
115 return url_request_context_ == other.url_request_context_ &&
116 media_url_request_context_ == other.media_url_request_context_ &&
117 appcache_service_ == other.appcache_service_ &&
118 quota_manager_ == other.quota_manager_ &&
119 filesystem_context_ == other.filesystem_context_ &&
120 database_tracker_ == other.database_tracker_ &&
121 indexed_db_context_ == other.indexed_db_context_ &&
122 service_worker_context_ == other.service_worker_context_;
123 }
124
76 } // namespace content 125 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698