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-04 01:29:39 +01:00
|
|
|
index 33a732dab0e8..99ecf91a66a5 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-02-10 18:10:17 +01:00
|
|
|
@@ -116,7 +116,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) {
|
2019-10-01 15:55:16 +02:00
|
|
|
file_task_runner = base::CreateTaskRunner(
|
|
|
|
{base::ThreadPool(), base::MayBlock(),
|
|
|
|
base::TaskPriority::USER_VISIBLE,
|
2019-03-24 01:39:54 +01:00
|
|
|
diff --git content/browser/browser_context.cc content/browser/browser_context.cc
|
2020-03-04 01:29:39 +01:00
|
|
|
index 44e6a961112b..f1f3e1af7f16 100644
|
2019-03-24 01:39:54 +01:00
|
|
|
--- content/browser/browser_context.cc
|
|
|
|
+++ content/browser/browser_context.cc
|
2020-03-04 01:29:39 +01:00
|
|
|
@@ -59,6 +59,7 @@
|
2019-03-24 01:39:54 +01:00
|
|
|
#include "content/public/common/content_switches.h"
|
|
|
|
#include "content/public/common/service_manager_connection.h"
|
|
|
|
#include "content/public/common/service_names.mojom.h"
|
|
|
|
+#include "media/capabilities/in_memory_video_decode_stats_db_impl.h"
|
2019-07-16 19:59:21 +02:00
|
|
|
#include "media/base/media_switches.h"
|
|
|
|
#include "media/capabilities/in_memory_video_decode_stats_db_impl.h"
|
2019-03-24 01:39:54 +01:00
|
|
|
#include "media/capabilities/video_decode_stats_db_impl.h"
|
2020-03-04 01:29:39 +01:00
|
|
|
@@ -170,7 +171,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-03-04 01:29:39 +01:00
|
|
|
@@ -675,7 +676,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-03-04 01:29:39 +01:00
|
|
|
index d4cb25f0b5c5..46a145e175e6 100644
|
2019-03-24 01:39:54 +01:00
|
|
|
--- storage/browser/database/database_tracker.cc
|
|
|
|
+++ storage/browser/database/database_tracker.cc
|
2020-03-04 01:29:39 +01:00
|
|
|
@@ -509,7 +509,7 @@ bool DatabaseTracker::LazyInit() {
|
2019-03-24 01:39:54 +01:00
|
|
|
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))) &&
|