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

Unified Diff: chrome/browser/profiles/profile_impl_io_data.cc

Issue 1982433002: Make SimpleCache the default backend on ChromeOS/Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: and fix it Created 4 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl_io_data.cc
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
index 49b9a266cc34c2c570e158fc385a849d6c0683b0..29806d4694791cabc142847974c1b0ac7b3b7da4 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -73,9 +73,7 @@
namespace {
net::BackendType ChooseCacheBackendType() {
-#if defined(OS_ANDROID)
- return net::CACHE_BACKEND_SIMPLE;
-#else
+#if !defined(OS_ANDROID)
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
if (command_line.HasSwitch(switches::kUseSimpleCacheBackend)) {
@@ -88,10 +86,19 @@ net::BackendType ChooseCacheBackendType() {
}
const std::string experiment_name =
base::FieldTrialList::FindFullName("SimpleCacheTrial");
- if (experiment_name == "ExperimentYes" ||
- experiment_name == "ExperimentYes2") {
+ if (base::StartsWith(experiment_name, "Disable",
+ base::CompareCase::INSENSITIVE_ASCII)) {
+ return net::CACHE_BACKEND_BLOCKFILE;
+ }
+ if (base::StartsWith(experiment_name, "ExperimentYes",
+ base::CompareCase::INSENSITIVE_ASCII)) {
return net::CACHE_BACKEND_SIMPLE;
}
+#endif // #if !defined(OS_ANDROID)
+
+#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS)
+ return net::CACHE_BACKEND_SIMPLE;
+#else
return net::CACHE_BACKEND_BLOCKFILE;
#endif
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698