| 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/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 Loading... |
| 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 enterprises. | 152 // This group policy is supported only on Windows and only for computers |
| 153 return base::win::IsEnterpriseManaged() | 153 // which are joined to a Windows domain. |
| 154 return base::win::IsEnrolledToDomain() |
| 154 ? base::SysWideToUTF8( | 155 ? base::SysWideToUTF8( |
| 155 GoogleUpdateSettings::GetDownloadPreference()) | 156 GoogleUpdateSettings::GetDownloadPreference()) |
| 156 : std::string(); | 157 : std::string(""); |
| 157 #else | 158 #else |
| 158 return std::string(); | 159 return std::string(""); |
| 159 #endif | 160 #endif |
| 160 } | 161 } |
| 161 | 162 |
| 162 net::URLRequestContextGetter* ChromeConfigurator::RequestContext() const { | 163 net::URLRequestContextGetter* ChromeConfigurator::RequestContext() const { |
| 163 return configurator_impl_.RequestContext(); | 164 return configurator_impl_.RequestContext(); |
| 164 } | 165 } |
| 165 | 166 |
| 166 scoped_refptr<update_client::OutOfProcessPatcher> | 167 scoped_refptr<update_client::OutOfProcessPatcher> |
| 167 ChromeConfigurator::CreateOutOfProcessPatcher() const { | 168 ChromeConfigurator::CreateOutOfProcessPatcher() const { |
| 168 return make_scoped_refptr(new ChromeOutOfProcessPatcher); | 169 return make_scoped_refptr(new ChromeOutOfProcessPatcher); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 | 216 |
| 216 scoped_refptr<update_client::Configurator> | 217 scoped_refptr<update_client::Configurator> |
| 217 MakeChromeComponentUpdaterConfigurator( | 218 MakeChromeComponentUpdaterConfigurator( |
| 218 const base::CommandLine* cmdline, | 219 const base::CommandLine* cmdline, |
| 219 net::URLRequestContextGetter* context_getter, | 220 net::URLRequestContextGetter* context_getter, |
| 220 PrefService* pref_service) { | 221 PrefService* pref_service) { |
| 221 return new ChromeConfigurator(cmdline, context_getter, pref_service); | 222 return new ChromeConfigurator(cmdline, context_getter, pref_service); |
| 222 } | 223 } |
| 223 | 224 |
| 224 } // namespace component_updater | 225 } // namespace component_updater |
| OLD | NEW |