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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 2506693002: Enable Initialization of the Task Scheduler by Default in the Browser Process (Closed)
Patch Set: Created 4 years, 1 month 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/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index ef8d8ccada69f44a348f08479ff86379c8f99f86..0bc8c5ac9b3380c8f7049d4a8d236703d1941c3c 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -316,16 +316,18 @@ void AddFirstRunNewTabs(StartupBrowserCreator* browser_creator,
#endif // !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
void MaybeInitializeTaskScheduler() {
fdoray 2016/11/15 18:40:17 No Maybe
robliao 2016/11/16 19:04:17 Done.
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableBrowserTaskScheduler)) {
+ return;
+ }
fdoray 2016/11/15 18:40:16 To migrate WorkerPool call sites, TaskScheduler mu
gab 2016/11/15 20:40:33 Agreed, can't ever have a disabled scheduler. As
robliao 2016/11/16 19:04:17 Done.
robliao 2016/11/16 19:04:17 Done.
+
static constexpr char kFieldTrialName[] = "BrowserScheduler";
std::map<std::string, std::string> variation_params;
if (!variations::GetVariationParams(kFieldTrialName, &variation_params)) {
- DCHECK(!base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableBrowserTaskScheduler))
- << "The Browser Task Scheduler remains disabled with "
- << switches::kEnableBrowserTaskScheduler
- << " because there is no available variation param for this build or "
- " the task scheduler is disabled in chrome://flags.";
- return;
+ variation_params["Background"] = "3;8;0.1;0;30000";
+ variation_params["BackgroundFileIO"] = "3;8;0.1;0;30000";
+ variation_params["Foreground"] = "8;32;0.3;0;30000";
+ variation_params["ForegroundFileIO"] = "8;32;0.3;0;30000";
fdoray 2016/11/15 18:40:16 To avoid duplication between iOS and other platfor
gab 2016/11/15 20:40:33 Need different defaults for OS_ANDROID too to matc
robliao 2016/11/16 19:04:17 That's a natural result of the content DEPS restri
robliao 2016/11/16 19:04:17 If some params are missing and invalid, we probabl
}
if (!task_scheduler_util::InitializeDefaultTaskScheduler(variation_params))
« 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