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

Side by Side 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: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/profiles/profile_impl_io_data.h" 5 #include "chrome/browser/profiles/profile_impl_io_data.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 if (command_line.HasSwitch(switches::kUseSimpleCacheBackend)) { 81 if (command_line.HasSwitch(switches::kUseSimpleCacheBackend)) {
82 const std::string opt_value = 82 const std::string opt_value =
83 command_line.GetSwitchValueASCII(switches::kUseSimpleCacheBackend); 83 command_line.GetSwitchValueASCII(switches::kUseSimpleCacheBackend);
84 if (base::LowerCaseEqualsASCII(opt_value, "off")) 84 if (base::LowerCaseEqualsASCII(opt_value, "off"))
85 return net::CACHE_BACKEND_BLOCKFILE; 85 return net::CACHE_BACKEND_BLOCKFILE;
86 if (opt_value.empty() || base::LowerCaseEqualsASCII(opt_value, "on")) 86 if (opt_value.empty() || base::LowerCaseEqualsASCII(opt_value, "on"))
87 return net::CACHE_BACKEND_SIMPLE; 87 return net::CACHE_BACKEND_SIMPLE;
88 } 88 }
89 const std::string experiment_name = 89 const std::string experiment_name =
90 base::FieldTrialList::FindFullName("SimpleCacheTrial"); 90 base::FieldTrialList::FindFullName("SimpleCacheTrial");
91 #if defined(OS_LINUX) || defined(OS_CHROMEOS)
92 // TODO(gavinp): Remove this experiment in the m53 timeframe.
93 if (experiment_name == "ExperimentNo" ||
94 experiment_name == "ExperimentControl") {
Alexei Svitkine (slow) 2016/05/13 18:40:51 If enabled is the new behavior, then any experimen
gavinp 2016/05/13 19:03:39 Good point. I've renamed the group "Disable" for t
95 return net::CACHE_BACKEND_BLOCKFILE;
96 }
97 return net::CACHE_BACKEND_SIMPLE;
98 #else
91 if (experiment_name == "ExperimentYes" || 99 if (experiment_name == "ExperimentYes" ||
92 experiment_name == "ExperimentYes2") { 100 experiment_name == "ExperimentYes2") {
93 return net::CACHE_BACKEND_SIMPLE; 101 return net::CACHE_BACKEND_SIMPLE;
94 } 102 }
95 return net::CACHE_BACKEND_BLOCKFILE; 103 return net::CACHE_BACKEND_BLOCKFILE;
96 #endif 104 #endif // #if defined(OS_LINUX) || defined(OS_CHROMEOS)
105 #endif // #if defined(OS_ANDROID)
97 } 106 }
98 107
99 } // namespace 108 } // namespace
100 109
101 using content::BrowserThread; 110 using content::BrowserThread;
102 111
103 ProfileImplIOData::Handle::Handle(Profile* profile) 112 ProfileImplIOData::Handle::Handle(Profile* profile)
104 : io_data_(new ProfileImplIOData), 113 : io_data_(new ProfileImplIOData),
105 profile_(profile), 114 profile_(profile),
106 initialized_(false) { 115 initialized_(false) {
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 const base::Closure& completion) { 791 const base::Closure& completion) {
783 DCHECK_CURRENTLY_ON(BrowserThread::IO); 792 DCHECK_CURRENTLY_ON(BrowserThread::IO);
784 DCHECK(initialized()); 793 DCHECK(initialized());
785 794
786 DCHECK(transport_security_state()); 795 DCHECK(transport_security_state());
787 // Completes synchronously. 796 // Completes synchronously.
788 transport_security_state()->DeleteAllDynamicDataSince(time); 797 transport_security_state()->DeleteAllDynamicDataSince(time);
789 DCHECK(http_server_properties_manager_); 798 DCHECK(http_server_properties_manager_);
790 http_server_properties_manager_->Clear(completion); 799 http_server_properties_manager_->Clear(completion);
791 } 800 }
OLDNEW
« 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