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

Unified Diff: content/browser/storage_partition_impl.cc

Issue 1737933002: mojo leveldb: Get profile and leveldb connected to DOMStorageContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge tot Created 4 years, 9 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
« no previous file with comments | « content/browser/storage_partition_impl.h ('k') | content/browser/storage_partition_impl_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/storage_partition_impl.cc
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc
index 7a9b90e87ea5e3ec8b12902d64fba6cbd3502365..4b4a5546febbc29173b58c885b2dec00ecfe1f1b 100644
--- a/content/browser/storage_partition_impl.cc
+++ b/content/browser/storage_partition_impl.cc
@@ -408,12 +408,15 @@ StoragePartitionImpl::~StoragePartitionImpl() {
StoragePartitionImpl* StoragePartitionImpl::Create(
BrowserContext* context,
bool in_memory,
- const base::FilePath& partition_path) {
+ const base::FilePath& relative_partition_path) {
// Ensure that these methods are called on the UI thread, except for
// unittests where a UI thread might not have been created.
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
!BrowserThread::IsMessageLoopValid(BrowserThread::UI));
+ base::FilePath partition_path =
+ context->GetPath().Append(relative_partition_path);
+
// All of the clients have to be created and registered with the
// QuotaManager prior to the QuotaManger being used. We do them
// all together here prior to handing out a reference to anything
@@ -440,9 +443,11 @@ StoragePartitionImpl* StoragePartitionImpl::Create(
BrowserThread::GetMessageLoopProxyForThread(
BrowserThread::FILE).get());
- base::FilePath path = in_memory ? base::FilePath() : partition_path;
+ base::FilePath path = in_memory ? base::FilePath() : context->GetPath();
horo 2016/03/31 04:23:19 |path| is also used by IndexedDBContextImpl, Cache
scoped_refptr<DOMStorageContextWrapper> dom_storage_context =
- new DOMStorageContextWrapper(path, context->GetSpecialStoragePolicy());
+ new DOMStorageContextWrapper(BrowserContext::GetMojoUserIdFor(context),
+ path, relative_partition_path,
+ context->GetSpecialStoragePolicy());
// BrowserMainLoop may not be initialized in unit tests. Tests will
// need to inject their own task runner into the IndexedDBContext.
« no previous file with comments | « content/browser/storage_partition_impl.h ('k') | content/browser/storage_partition_impl_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698