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

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

Issue 2939443004: Load credentials on desktop even when there is no authenticated account ID. (Closed)
Patch Set: Unit test Created 3 years, 6 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
« no previous file with comments | « components/signin/core/common/profile_management_switches.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 14 matching lines...) Expand all
25 if (method == switches::kAccountConsistencyDice) 25 if (method == switches::kAccountConsistencyDice)
26 return AccountConsistencyMethod::kDice; 26 return AccountConsistencyMethod::kDice;
27 return AccountConsistencyMethod::kDisabled; 27 return AccountConsistencyMethod::kDisabled;
28 #endif // defined(OS_ANDROID) || defined(OS_IOS) 28 #endif // defined(OS_ANDROID) || defined(OS_IOS)
29 } 29 }
30 30
31 bool IsAccountConsistencyMirrorEnabled() { 31 bool IsAccountConsistencyMirrorEnabled() {
32 return GetAccountConsistencyMethod() == AccountConsistencyMethod::kMirror; 32 return GetAccountConsistencyMethod() == AccountConsistencyMethod::kMirror;
33 } 33 }
34 34
35 bool IsAccountConsistencyDiceEnabled() {
36 return GetAccountConsistencyMethod() == AccountConsistencyMethod::kDice;
37 }
38
35 bool IsExtensionsMultiAccount() { 39 bool IsExtensionsMultiAccount() {
36 #if defined(OS_ANDROID) || defined(OS_IOS) 40 #if defined(OS_ANDROID) || defined(OS_IOS)
37 NOTREACHED() << "Extensions are not enabled on Android or iOS"; 41 NOTREACHED() << "Extensions are not enabled on Android or iOS";
38 // Account consistency is enabled on Android and iOS. 42 // Account consistency is enabled on Android and iOS.
39 return false; 43 return false;
40 #endif 44 #endif
41 45
42 return base::CommandLine::ForCurrentProcess()->HasSwitch( 46 return base::CommandLine::ForCurrentProcess()->HasSwitch(
43 switches::kExtensionsMultiAccount) || 47 switches::kExtensionsMultiAccount) ||
44 GetAccountConsistencyMethod() == AccountConsistencyMethod::kMirror; 48 GetAccountConsistencyMethod() == AccountConsistencyMethod::kMirror;
45 } 49 }
46 50
47 void EnableAccountConsistencyMirrorForTesting(base::CommandLine* command_line) { 51 void EnableAccountConsistencyMirrorForTesting(base::CommandLine* command_line) {
48 #if !defined(OS_ANDROID) && !defined(OS_IOS) 52 #if !defined(OS_ANDROID) && !defined(OS_IOS)
49 command_line->AppendSwitchASCII(switches::kAccountConsistency, 53 command_line->AppendSwitchASCII(switches::kAccountConsistency,
50 switches::kAccountConsistencyMirror); 54 switches::kAccountConsistencyMirror);
51 #endif 55 #endif
52 } 56 }
53 57
54 #if !defined(OS_ANDROID) && !defined(OS_IOS) 58 #if !defined(OS_ANDROID) && !defined(OS_IOS)
55 void EnableAccountConsistencyDiceForTesting(base::CommandLine* command_line) { 59 void EnableAccountConsistencyDiceForTesting(base::CommandLine* command_line) {
56 command_line->AppendSwitchASCII(switches::kAccountConsistency, 60 command_line->AppendSwitchASCII(switches::kAccountConsistency,
57 switches::kAccountConsistencyDice); 61 switches::kAccountConsistencyDice);
58 } 62 }
59 #endif 63 #endif
60 64
61 } // namespace switches 65 } // namespace switches
OLDNEW
« no previous file with comments | « components/signin/core/common/profile_management_switches.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698