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

Side by Side Diff: chrome/browser/policy/chrome_browser_policy_connector.cc

Issue 927573002: Make sure key::kEnableWebBasedSignin policy also turns on command line arg (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add deprecation message Created 5 years, 10 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 "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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 !command_line->HasSwitch(switches::kEnableWebBasedSignin)) {
136 // In M41, to fully enable web-based sign in, the kEnableIframeBasedSignin
137 // must also be specified.
136 command_line->AppendSwitch(switches::kEnableWebBasedSignin); 138 command_line->AppendSwitch(switches::kEnableWebBasedSignin);
139 command_line->AppendSwitch(switches::kEnableIframeBasedSignin);
137 } 140 }
138 } 141 }
139 142
140 } // namespace policy 143 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | components/policy/resources/policy_templates.json » ('j') | components/policy/resources/policy_templates.json » ('J')

Powered by Google App Engine
This is Rietveld 408576698