| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 #endif | 132 #endif |
| 133 } | 133 } |
| 134 | 134 |
| 135 void ChromeBrowserPolicyConnector::AppendExtraFlagPerPolicy() { | 135 void ChromeBrowserPolicyConnector::AppendExtraFlagPerPolicy() { |
| 136 PolicyService* policy_service = GetPolicyService(); | 136 PolicyService* policy_service = GetPolicyService(); |
| 137 PolicyNamespace chrome_ns = PolicyNamespace(POLICY_DOMAIN_CHROME, ""); | 137 PolicyNamespace chrome_ns = PolicyNamespace(POLICY_DOMAIN_CHROME, ""); |
| 138 const PolicyMap& chrome_policy = policy_service->GetPolicies(chrome_ns); | 138 const PolicyMap& chrome_policy = policy_service->GetPolicies(chrome_ns); |
| 139 const base::Value* policy_value = | 139 const base::Value* policy_value = |
| 140 chrome_policy.GetValue(key::kEnableWebBasedSignin); | 140 chrome_policy.GetValue(key::kEnableWebBasedSignin); |
| 141 bool enabled = false; | 141 bool enabled = false; |
| 142 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 142 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 143 if (policy_value && policy_value->GetAsBoolean(&enabled) && enabled && | 143 if (policy_value && policy_value->GetAsBoolean(&enabled) && enabled && |
| 144 !command_line->HasSwitch(switches::kEnableWebBasedSignin)) { | 144 !command_line->HasSwitch(switches::kEnableWebBasedSignin)) { |
| 145 command_line->AppendSwitch(switches::kEnableWebBasedSignin); | 145 command_line->AppendSwitch(switches::kEnableWebBasedSignin); |
| 146 } | 146 } |
| 147 } | 147 } |
| 148 | 148 |
| 149 } // namespace policy | 149 } // namespace policy |
| OLD | NEW |