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

Unified Diff: chrome/browser/chrome_browser_field_trials_desktop.cc

Issue 993003002: Add lightspeed experiments to disable gpu. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Consolidate code for one param. Created 5 years, 9 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/chrome_browser_field_trials_desktop.cc
diff --git a/chrome/browser/chrome_browser_field_trials_desktop.cc b/chrome/browser/chrome_browser_field_trials_desktop.cc
index 9f3c516fb87e0d1f133037734df1da04d4eaa047..31af3f64082529117092bd799419e8ae1d3728d7 100644
--- a/chrome/browser/chrome_browser_field_trials_desktop.cc
+++ b/chrome/browser/chrome_browser_field_trials_desktop.cc
@@ -20,6 +20,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/variations/variations_util.h"
+#include "components/variations/variations_associated_data.h"
#include "content/public/common/content_constants.h"
#include "net/spdy/spdy_session.h"
#include "ui/base/layout.h"
@@ -63,6 +64,13 @@ void DisableShowProfileSwitcherTrialIfNecessary() {
trial->Disable();
}
+void SetupLightSpeedTrials() {
+ if (!variations::GetVariationParamValue("LightSpeed", "NoGpu").empty()) {
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kDisableGpu);
+ }
+}
+
} // namespace
void SetupDesktopFieldTrials(const base::CommandLine& parsed_command_line,
@@ -71,6 +79,7 @@ void SetupDesktopFieldTrials(const base::CommandLine& parsed_command_line,
AutoLaunchChromeFieldTrial();
SetupInfiniteCacheFieldTrial();
DisableShowProfileSwitcherTrialIfNecessary();
+ SetupLightSpeedTrials();
SetupShowAppLauncherPromoFieldTrial(local_state);
}
« 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