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

Side by Side Diff: content/browser/storage_partition_impl.cc

Issue 11147026: Initial refactor to get profiles to propagate storage partition details. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes based on Albert's review. Created 8 years, 2 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 | Annotate | Revision Log
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/storage_partition_impl.h" 5 #include "content/browser/storage_partition_impl.h"
6 6
7 #include "content/browser/fileapi/browser_file_system_helper.h" 7 #include "content/browser/fileapi/browser_file_system_helper.h"
8 #include "content/public/browser/browser_context.h" 8 #include "content/public/browser/browser_context.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "net/url_request/url_request_context_getter.h" 10 #include "net/url_request/url_request_context_getter.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 fileapi::FileSystemContext* filesystem_context, 60 fileapi::FileSystemContext* filesystem_context,
61 webkit_database::DatabaseTracker* database_tracker, 61 webkit_database::DatabaseTracker* database_tracker,
62 DOMStorageContextImpl* dom_storage_context, 62 DOMStorageContextImpl* dom_storage_context,
63 IndexedDBContextImpl* indexed_db_context) 63 IndexedDBContextImpl* indexed_db_context)
64 : partition_path_(partition_path), 64 : partition_path_(partition_path),
65 quota_manager_(quota_manager), 65 quota_manager_(quota_manager),
66 appcache_service_(appcache_service), 66 appcache_service_(appcache_service),
67 filesystem_context_(filesystem_context), 67 filesystem_context_(filesystem_context),
68 database_tracker_(database_tracker), 68 database_tracker_(database_tracker),
69 dom_storage_context_(dom_storage_context), 69 dom_storage_context_(dom_storage_context),
70 indexed_db_context_(indexed_db_context) { 70 indexed_db_context_(indexed_db_context),
71 in_memory_(false) {
71 } 72 }
72 73
73 StoragePartitionImpl::~StoragePartitionImpl() { 74 StoragePartitionImpl::~StoragePartitionImpl() {
74 // These message loop checks are just to avoid leaks in unittests. 75 // These message loop checks are just to avoid leaks in unittests.
75 if (GetDatabaseTracker() && 76 if (GetDatabaseTracker() &&
76 BrowserThread::IsMessageLoopValid(BrowserThread::FILE)) { 77 BrowserThread::IsMessageLoopValid(BrowserThread::FILE)) {
77 BrowserThread::PostTask( 78 BrowserThread::PostTask(
78 BrowserThread::FILE, FROM_HERE, 79 BrowserThread::FILE, FROM_HERE,
79 base::Bind(&webkit_database::DatabaseTracker::Shutdown, 80 base::Bind(&webkit_database::DatabaseTracker::Shutdown,
80 GetDatabaseTracker())); 81 GetDatabaseTracker()));
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 } 175 }
175 176
176 DOMStorageContextImpl* StoragePartitionImpl::GetDOMStorageContext() { 177 DOMStorageContextImpl* StoragePartitionImpl::GetDOMStorageContext() {
177 return dom_storage_context_; 178 return dom_storage_context_;
178 } 179 }
179 180
180 IndexedDBContextImpl* StoragePartitionImpl::GetIndexedDBContext() { 181 IndexedDBContextImpl* StoragePartitionImpl::GetIndexedDBContext() {
181 return indexed_db_context_; 182 return indexed_db_context_;
182 } 183 }
183 184
185 bool StoragePartitionImpl::InMemory() {
186 return in_memory_;
187 }
188
184 void StoragePartitionImpl::SetURLRequestContext( 189 void StoragePartitionImpl::SetURLRequestContext(
185 net::URLRequestContextGetter* url_request_context) { 190 net::URLRequestContextGetter* url_request_context) {
186 url_request_context_ = url_request_context; 191 url_request_context_ = url_request_context;
187 } 192 }
188 193
189 void StoragePartitionImpl::SetMediaURLRequestContext( 194 void StoragePartitionImpl::SetMediaURLRequestContext(
190 net::URLRequestContextGetter* media_url_request_context) { 195 net::URLRequestContextGetter* media_url_request_context) {
191 media_url_request_context_ = media_url_request_context; 196 media_url_request_context_ = media_url_request_context;
192 } 197 }
193 198
194 } // namespace content 199 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698