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

Unified Diff: chrome/common/profile_management_switches.cc

Issue 136693007: Use --new-profile-management to set all related flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: changed order of precedence in accepting flag settings Created 6 years, 11 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/common/profile_management_switches.cc
diff --git a/chrome/common/profile_management_switches.cc b/chrome/common/profile_management_switches.cc
index 8215b99e084ff4e5669bfc027e92f00216d1c57f..a33d62a657566e9109c92ebd2eccd5f6105169cd 100644
--- a/chrome/common/profile_management_switches.cc
+++ b/chrome/common/profile_management_switches.cc
@@ -13,6 +13,18 @@ namespace {
const char kNewProfileManagementFieldTrialName[] = "NewProfileManagement";
bool CheckProfileManagementFlag(std::string command_switch, bool active_state) {
+ // Individiual flag settings take precedence.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(command_switch)) {
+ return true;
+ }
+
+ // --new-profile-management flag always affects all switches.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kNewProfileManagement)) {
+ return active_state;
+ }
+
+ // NewProfileManagement experiment acts like above flag.
std::string trial_type =
base::FieldTrialList::FindFullName(kNewProfileManagementFieldTrialName);
if (!trial_type.empty()) {
@@ -21,7 +33,8 @@ bool CheckProfileManagementFlag(std::string command_switch, bool active_state) {
if (trial_type == "Disabled")
return !active_state;
}
- return CommandLine::ForCurrentProcess()->HasSwitch(command_switch);
+
+ return false;
}
} // namespace
« 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