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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2568793003: Control TaskScheduler initialization params in renderers via field trial. (Closed)
Patch Set: self-review Created 4 years 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 | chrome/renderer/BUILD.gn » ('j') | components/task_scheduler_util/common/variations_util.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 0d4b017bf7bdf809b335ed9a5d2ef6a36ad3342a..b3c6215cdb924b1a0375986321e5e34fc7a1bd28 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -145,6 +145,7 @@
#include "components/spellcheck/spellcheck_build_features.h"
#include "components/startup_metric_utils/browser/startup_metric_host_impl.h"
#include "components/task_scheduler_util/browser/initialization.h"
+#include "components/task_scheduler_util/common/variations_util.h"
#include "components/translate/core/common/translate_switches.h"
#include "components/url_formatter/url_fixer.h"
#include "components/variations/variations_associated_data.h"
@@ -1817,6 +1818,15 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
StackSamplingConfiguration::Get()->AppendCommandLineSwitchForChildProcess(
process_type,
command_line);
+
+ if (process_type == switches::kRendererProcess) {
+ std::map<std::string, std::string> task_scheduler_variation_params;
+ if (variations::GetVariationParams("BrowserScheduler",
+ &task_scheduler_variation_params)) {
+ task_scheduler_util::AddVariationParamsToCommandLine(
+ task_scheduler_variation_params, "Renderer", command_line);
+ }
+ }
}
std::string ChromeContentBrowserClient::GetApplicationLocale() {
« no previous file with comments | « no previous file | chrome/renderer/BUILD.gn » ('j') | components/task_scheduler_util/common/variations_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698