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

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

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugins_resource_service.cc ('k') | chrome/browser/policy/cloud/cloud_policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698