OLD | NEW |
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 "chrome/browser/policy/chrome_browser_policy_connector.h" | 5 #include "chrome/browser/policy/chrome_browser_policy_connector.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 } | 124 } |
125 | 125 |
126 void ChromeBrowserPolicyConnector::AppendExtraFlagPerPolicy() { | 126 void ChromeBrowserPolicyConnector::AppendExtraFlagPerPolicy() { |
127 PolicyService* policy_service = GetPolicyService(); | 127 PolicyService* policy_service = GetPolicyService(); |
128 PolicyNamespace chrome_ns = PolicyNamespace(POLICY_DOMAIN_CHROME, ""); | 128 PolicyNamespace chrome_ns = PolicyNamespace(POLICY_DOMAIN_CHROME, ""); |
129 const PolicyMap& chrome_policy = policy_service->GetPolicies(chrome_ns); | 129 const PolicyMap& chrome_policy = policy_service->GetPolicies(chrome_ns); |
130 const base::Value* policy_value = | 130 const base::Value* policy_value = |
131 chrome_policy.GetValue(key::kEnableWebBasedSignin); | 131 chrome_policy.GetValue(key::kEnableWebBasedSignin); |
132 bool enabled = false; | 132 bool enabled = false; |
133 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 133 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
134 if (policy_value && policy_value->GetAsBoolean(&enabled) && enabled && | 134 if (policy_value && policy_value->GetAsBoolean(&enabled) && enabled) { |
135 !command_line->HasSwitch(switches::kEnableWebBasedSignin)) { | 135 if (!command_line->HasSwitch(switches::kEnableWebBasedSignin)) |
136 command_line->AppendSwitch(switches::kEnableWebBasedSignin); | 136 command_line->AppendSwitch(switches::kEnableWebBasedSignin); |
| 137 // In M41, to fully enable web-based sign in, the kEnableIframeBasedSignin |
| 138 // must also be specified. |
| 139 if (!command_line->HasSwitch(switches::kEnableIframeBasedSignin)) |
| 140 command_line->AppendSwitch(switches::kEnableIframeBasedSignin); |
137 } | 141 } |
138 } | 142 } |
139 | 143 |
140 } // namespace policy | 144 } // namespace policy |
OLD | NEW |