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

Side by Side Diff: components/signin/core/common/profile_management_switches.cc

Issue 1349783006: Cleanup: Pass std::string as const reference if possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert third_party changes Created 5 years, 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/signin/core/common/profile_management_switches.h" 5 #include "components/signin/core/common/profile_management_switches.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "components/signin/core/common/signin_switches.h" 10 #include "components/signin/core/common/signin_switches.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } else if (trial_type == "NewAvatarMenu") { 99 } else if (trial_type == "NewAvatarMenu") {
100 state = STATE_NEW_AVATAR_MENU; 100 state = STATE_NEW_AVATAR_MENU;
101 } else { 101 } else {
102 state = STATE_NEW_PROFILE_MANAGEMENT; 102 state = STATE_NEW_PROFILE_MANAGEMENT;
103 } 103 }
104 } 104 }
105 105
106 return state; 106 return state;
107 } 107 }
108 108
109 bool CheckFlag(std::string command_switch, State min_state) { 109 bool CheckFlag(const std::string& command_switch, State min_state) {
110 // Individiual flag settings take precedence. 110 // Individiual flag settings take precedence.
111 if (base::CommandLine::ForCurrentProcess()->HasSwitch(command_switch)) 111 if (base::CommandLine::ForCurrentProcess()->HasSwitch(command_switch))
112 return true; 112 return true;
113 113
114 return GetProcessState() >= min_state; 114 return GetProcessState() >= min_state;
115 } 115 }
116 116
117 } // namespace 117 } // namespace
118 118
119 namespace switches { 119 namespace switches {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 command_line->AppendSwitch(switches::kEnableNewProfileManagement); 173 command_line->AppendSwitch(switches::kEnableNewProfileManagement);
174 DCHECK(!command_line->HasSwitch(switches::kDisableNewProfileManagement)); 174 DCHECK(!command_line->HasSwitch(switches::kDisableNewProfileManagement));
175 } 175 }
176 176
177 void EnableAccountConsistencyForTesting(base::CommandLine* command_line) { 177 void EnableAccountConsistencyForTesting(base::CommandLine* command_line) {
178 command_line->AppendSwitch(switches::kEnableAccountConsistency); 178 command_line->AppendSwitch(switches::kEnableAccountConsistency);
179 DCHECK(!command_line->HasSwitch(switches::kDisableAccountConsistency)); 179 DCHECK(!command_line->HasSwitch(switches::kDisableAccountConsistency));
180 } 180 }
181 181
182 } // namespace switches 182 } // namespace switches
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698