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

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: Make code more rebust 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
« no previous file with comments | « no previous file | components/policy/resources/policy_templates.json » ('j') | 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 "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
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
OLDNEW
« no previous file with comments | « no previous file | components/policy/resources/policy_templates.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698