2019-03-24 01:39:54 +01:00
|
|
|
diff --git content/browser/blob_storage/chrome_blob_storage_context.cc content/browser/blob_storage/chrome_blob_storage_context.cc
|
2020-03-30 22:13:42 +02:00
|
|
|
index f90e9fce0675..33551a2874bc 100644
|
2019-03-24 01:39:54 +01:00
|
|
|
--- content/browser/blob_storage/chrome_blob_storage_context.cc
|
|
|
|
+++ content/browser/blob_storage/chrome_blob_storage_context.cc
|
2020-03-30 22:13:42 +02:00
|
|
|
@@ -117,7 +117,8 @@ ChromeBlobStorageContext* ChromeBlobStorageContext::GetFor(
|
2019-03-24 01:39:54 +01:00
|
|
|
|
|
|
|
// If we're not incognito mode, schedule all of our file tasks to enable
|
|
|
|
// disk on the storage context.
|
|
|
|
- if (!context->IsOffTheRecord() && io_thread_valid) {
|
|
|
|
+ if (!context->GetPath().empty() && !context->IsOffTheRecord() &&
|
|
|
|
+ io_thread_valid) {
|
2020-03-30 22:13:42 +02:00
|
|
|
file_task_runner = base::ThreadPool::CreateTaskRunner(
|
|
|
|
{base::MayBlock(), base::TaskPriority::USER_VISIBLE,
|
|
|
|
base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN});
|
2019-03-24 01:39:54 +01:00
|
|
|
diff --git content/browser/browser_context.cc content/browser/browser_context.cc
|
2020-06-09 19:48:00 +02:00
|
|
|
index 05473c622dbd..9cd0e465fd2d 100644
|
2019-03-24 01:39:54 +01:00
|
|
|
--- content/browser/browser_context.cc
|
|
|
|
+++ content/browser/browser_context.cc
|
2020-06-09 19:48:00 +02:00
|
|
|
@@ -129,7 +129,7 @@ StoragePartition* GetStoragePartitionFromConfig(
|
2019-03-24 01:39:54 +01:00
|
|
|
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,
|
2020-06-09 19:48:00 +02:00
|
|
|
@@ -543,7 +543,7 @@ media::VideoDecodePerfHistory* BrowserContext::GetVideoDecodePerfHistory() {
|
2019-07-16 19:59:21 +02:00
|
|
|
kUseInMemoryDBDefault);
|
|
|
|
|
|
|
|
std::unique_ptr<media::VideoDecodeStatsDB> stats_db;
|
|
|
|
- if (use_in_memory_db) {
|
|
|
|
+ if (use_in_memory_db || GetPath().empty()) {
|
|
|
|
stats_db =
|
|
|
|
std::make_unique<media::InMemoryVideoDecodeStatsDBImpl>(nullptr);
|
|
|
|
} else {
|
2019-03-24 01:39:54 +01:00
|
|
|
diff --git storage/browser/database/database_tracker.cc storage/browser/database/database_tracker.cc
|
2020-06-09 19:48:00 +02:00
|
|
|
index ecc6a0d2b8e5..b120add8abab 100644
|
2019-03-24 01:39:54 +01:00
|
|
|
--- storage/browser/database/database_tracker.cc
|
|
|
|
+++ storage/browser/database/database_tracker.cc
|
2020-03-30 22:13:42 +02:00
|
|
|
@@ -506,7 +506,7 @@ bool DatabaseTracker::LazyInit() {
|
2019-03-24 01:39:54 +01:00
|
|
|
meta_table_.reset(new sql::MetaTable());
|
|
|
|
|
|
|
|
is_initialized_ =
|
|
|
|
- base::CreateDirectory(db_dir_) &&
|
2020-06-09 19:48:00 +02:00
|
|
|
+ (is_off_the_record_ ? true : base::CreateDirectory(db_dir_)) &&
|
2019-03-24 01:39:54 +01:00
|
|
|
(db_->is_open() ||
|
2020-06-09 19:48:00 +02:00
|
|
|
(is_off_the_record_ ? db_->OpenInMemory()
|
|
|
|
: db_->Open(kTrackerDatabaseFullPath))) &&
|