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

Side by Side Diff: chrome/browser/component_updater/chrome_component_updater_configurator.cc

Issue 2581353002: Use the Windows MDM API to check if the machine is being managed. (Closed)
Patch Set: Address review comments Created 3 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/component_updater/chrome_component_updater_configurator .h" 5 #include "chrome/browser/component_updater/chrome_component_updater_configurator .h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 std::string ChromeConfigurator::GetOSLongName() const { 142 std::string ChromeConfigurator::GetOSLongName() const {
143 return configurator_impl_.GetOSLongName(); 143 return configurator_impl_.GetOSLongName();
144 } 144 }
145 145
146 std::string ChromeConfigurator::ExtraRequestParams() const { 146 std::string ChromeConfigurator::ExtraRequestParams() const {
147 return configurator_impl_.ExtraRequestParams(); 147 return configurator_impl_.ExtraRequestParams();
148 } 148 }
149 149
150 std::string ChromeConfigurator::GetDownloadPreference() const { 150 std::string ChromeConfigurator::GetDownloadPreference() const {
151 #if defined(OS_WIN) 151 #if defined(OS_WIN)
152 // This group policy is supported only on Windows and only for computers 152 // This group policy is supported only on Windows and only for enterprises.
153 // which are joined to a Windows domain. 153 return base::win::IsEnterpriseManaged()
154 return base::win::IsEnrolledToDomain()
155 ? base::SysWideToUTF8( 154 ? base::SysWideToUTF8(
156 GoogleUpdateSettings::GetDownloadPreference()) 155 GoogleUpdateSettings::GetDownloadPreference())
157 : std::string(""); 156 : std::string("");
sky 2017/02/15 21:27:15 std::string("") -> std::string()
Roger Tawa OOO till Jul 10th 2017/02/17 19:20:13 Done.
158 #else 157 #else
159 return std::string(""); 158 return std::string("");
sky 2017/02/15 21:27:15 Same comment here.
Roger Tawa OOO till Jul 10th 2017/02/17 19:20:13 Done.
160 #endif 159 #endif
161 } 160 }
162 161
163 net::URLRequestContextGetter* ChromeConfigurator::RequestContext() const { 162 net::URLRequestContextGetter* ChromeConfigurator::RequestContext() const {
164 return configurator_impl_.RequestContext(); 163 return configurator_impl_.RequestContext();
165 } 164 }
166 165
167 scoped_refptr<update_client::OutOfProcessPatcher> 166 scoped_refptr<update_client::OutOfProcessPatcher>
168 ChromeConfigurator::CreateOutOfProcessPatcher() const { 167 ChromeConfigurator::CreateOutOfProcessPatcher() const {
169 return make_scoped_refptr(new ChromeOutOfProcessPatcher); 168 return make_scoped_refptr(new ChromeOutOfProcessPatcher);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 215
217 scoped_refptr<update_client::Configurator> 216 scoped_refptr<update_client::Configurator>
218 MakeChromeComponentUpdaterConfigurator( 217 MakeChromeComponentUpdaterConfigurator(
219 const base::CommandLine* cmdline, 218 const base::CommandLine* cmdline,
220 net::URLRequestContextGetter* context_getter, 219 net::URLRequestContextGetter* context_getter,
221 PrefService* pref_service) { 220 PrefService* pref_service) {
222 return new ChromeConfigurator(cmdline, context_getter, pref_service); 221 return new ChromeConfigurator(cmdline, context_getter, pref_service);
223 } 222 }
224 223
225 } // namespace component_updater 224 } // namespace component_updater
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698