| Index: content/browser/dom_storage/dom_storage_context_wrapper.cc
|
| diff --git a/content/browser/dom_storage/dom_storage_context_wrapper.cc b/content/browser/dom_storage/dom_storage_context_wrapper.cc
|
| index 926b4c0feb646961094a9d79062c1f0bf5675766..c2023a6ada6a644fa693b20251cdf0ceeefa2be9 100644
|
| --- a/content/browser/dom_storage/dom_storage_context_wrapper.cc
|
| +++ b/content/browser/dom_storage/dom_storage_context_wrapper.cc
|
| @@ -83,18 +83,6 @@ DOMStorageContextWrapper::DOMStorageContextWrapper(
|
| const base::FilePath& profile_path,
|
| const base::FilePath& local_partition_path,
|
| storage::SpecialStoragePolicy* special_storage_policy) {
|
| - if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kMojoLocalStorage)) {
|
| - base::FilePath storage_dir;
|
| - if (!profile_path.empty())
|
| - storage_dir = local_partition_path.AppendASCII(kLocalStorageDirectory);
|
| - // TODO(michaeln): Enable writing to disk when db is versioned,
|
| - // for now using an empty subdirectory to use an in-memory db.
|
| - // subdirectory_(subdirectory),
|
| - mojo_state_.reset(new LocalStorageContextMojo(
|
| - connector, base::FilePath() /* storage_dir */));
|
| - }
|
| -
|
| base::FilePath data_path;
|
| if (!profile_path.empty())
|
| data_path = profile_path.Append(local_partition_path);
|
| @@ -134,6 +122,21 @@ DOMStorageContextWrapper::DOMStorageContextWrapper(
|
| new DOMStorageWorkerPoolTaskRunner(std::move(primary_sequence),
|
| std::move(commit_sequence)));
|
|
|
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kMojoLocalStorage)) {
|
| + base::FilePath storage_dir;
|
| + if (!profile_path.empty())
|
| + storage_dir = local_partition_path.AppendASCII(kLocalStorageDirectory);
|
| + // TODO(michaeln): Enable writing to disk when db is versioned,
|
| + // for now using an empty subdirectory to use an in-memory db.
|
| + // subdirectory_(subdirectory),
|
| + mojo_state_.reset(new LocalStorageContextMojo(
|
| + connector, context_->task_runner(),
|
| + data_path.empty() ? data_path
|
| + : data_path.AppendASCII(kLocalStorageDirectory),
|
| + base::FilePath() /* storage_dir */));
|
| + }
|
| +
|
| if (base::FeatureList::IsEnabled(features::kMemoryCoordinator)) {
|
| base::MemoryCoordinatorClientRegistry::GetInstance()->Register(this);
|
| } else {
|
|
|