diff --git a/patch/patch.cfg b/patch/patch.cfg index b8d7a06ec..76748ee52 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -247,6 +247,9 @@ patches = [ # Check RenderProcessHostImpl's |browser_context_| member before re- # initializing the channel from RPHI::ProcessDied. # https://bitbucket.org/chromiumembedded/cef/issues/2096 + # + # Don't create a "databases" directory when cache_path is empty. + # https://bitbucket.org/chromiumembedded/cef/issues/2289 'name': 'storage_partition_1973', }, { diff --git a/patch/patches/storage_partition_1973.patch b/patch/patches/storage_partition_1973.patch index 62619d9bd..0b8a2d5dc 100644 --- a/patch/patches/storage_partition_1973.patch +++ b/patch/patches/storage_partition_1973.patch @@ -59,11 +59,15 @@ index 13d802fa72cd..a2d34d1d72eb 100644 partition->GetBluetoothAllowedDevicesMap(); return allowed_devices_map->GetOrCreateAllowedDevices(GetOrigin()); diff --git content/browser/browser_context.cc content/browser/browser_context.cc -index 42b002908c3b..f7d9c3933090 100644 +index 42b002908c3b..6787b9ed35b7 100644 --- content/browser/browser_context.cc +++ content/browser/browser_context.cc -@@ -125,7 +125,14 @@ StoragePartition* GetStoragePartitionFromConfig( - if (browser_context->IsOffTheRecord()) +@@ -122,10 +122,17 @@ StoragePartition* GetStoragePartitionFromConfig( + StoragePartitionImplMap* partition_map = + GetStoragePartitionMap(browser_context); + +- if (browser_context->IsOffTheRecord()) ++ if (browser_context->IsOffTheRecord() || browser_context->GetPath().empty()) in_memory = true; - return partition_map->Get(partition_domain, partition_name, in_memory); @@ -669,3 +673,16 @@ index cf270b894186..1f95c9c3b023 100644 protected: virtual ~StoragePartition() {} }; +diff --git storage/browser/database/database_tracker.cc storage/browser/database/database_tracker.cc +index 86fb9f41fc71..7a8be02473a3 100644 +--- storage/browser/database/database_tracker.cc ++++ storage/browser/database/database_tracker.cc +@@ -495,7 +495,7 @@ bool DatabaseTracker::LazyInit() { + meta_table_.reset(new sql::MetaTable()); + + is_initialized_ = +- base::CreateDirectory(db_dir_) && ++ (is_incognito_ ? true : base::CreateDirectory(db_dir_)) && + (db_->is_open() || + (is_incognito_ ? db_->OpenInMemory() : + db_->Open(kTrackerDatabaseFullPath))) && diff --git a/tests/shared/browser/client_app_browser.cc b/tests/shared/browser/client_app_browser.cc index d688ff8f0..fe2f2caee 100644 --- a/tests/shared/browser/client_app_browser.cc +++ b/tests/shared/browser/client_app_browser.cc @@ -48,6 +48,12 @@ void ClientAppBrowser::OnBeforeCommandLineProcessing( command_line->AppendSwitchWithValue("top-chrome-md", "non-material"); } + if (!command_line->HasSwitch(switches::kCachePath) && + !command_line->HasSwitch("disable-gpu-shader-disk-cache")) { + // Don't create a "GPUCache" directory when cache-path is unspecified. + command_line->AppendSwitch("disable-gpu-shader-disk-cache"); + } + DelegateSet::iterator it = delegates_.begin(); for (; it != delegates_.end(); ++it) (*it)->OnBeforeCommandLineProcessing(this, command_line);