Chromium Code Reviews| Index: chrome/browser/component_updater/chrome_component_updater_configurator.cc |
| diff --git a/chrome/browser/component_updater/chrome_component_updater_configurator.cc b/chrome/browser/component_updater/chrome_component_updater_configurator.cc |
| index eb0d7830daa6ae7eba44d13489f310cd92bc524c..0be6d6aebde3659609e726e221adc808e861cf38 100644 |
| --- a/chrome/browser/component_updater/chrome_component_updater_configurator.cc |
| +++ b/chrome/browser/component_updater/chrome_component_updater_configurator.cc |
| @@ -7,11 +7,18 @@ |
| #include <string> |
| #include <vector> |
| +#include "base/strings/sys_string_conversions.h" |
| #include "base/threading/sequenced_worker_pool.h" |
| #include "base/version.h" |
| +#if defined(OS_WIN) |
| +#include "base/win/win_util.h" |
| +#endif |
| #include "chrome/browser/component_updater/component_patcher_operation_out_of_process.h" |
| #include "chrome/browser/update_client/chrome_update_query_params_delegate.h" |
| #include "chrome/common/channel_info.h" |
| +#if defined(OS_WIN) |
| +#include "chrome/installer/util/google_update_settings.h" |
| +#endif |
| #include "components/component_updater/configurator_impl.h" |
| #include "content/public/browser/browser_thread.h" |
| @@ -37,6 +44,7 @@ class ChromeConfigurator : public update_client::Configurator { |
| std::string GetLang() const override; |
| std::string GetOSLongName() const override; |
| std::string ExtraRequestParams() const override; |
| + std::string GetDownloadPreference() const override; |
| net::URLRequestContextGetter* RequestContext() const override; |
| scoped_refptr<update_client::OutOfProcessPatcher> CreateOutOfProcessPatcher() |
| const override; |
| @@ -106,6 +114,19 @@ std::string ChromeConfigurator::ExtraRequestParams() const { |
| return configurator_impl_.ExtraRequestParams(); |
| } |
| +std::string ChromeConfigurator::GetDownloadPreference() const { |
| +#if defined(OS_WIN) |
| + // This group policy is supported only on Windows and only for computers |
| + // which are joined to a Windows domain. |
| + return base::win::IsEnrolledToDomain() |
| + ? base::SysWideToUTF8( |
| + GoogleUpdateSettings::GetDownloadPreference()) |
| + : std::string(""); |
| +#else |
| + return std::string(""); |
|
droger
2016/01/22 10:32:15
Why not
return configurator_impl_.GetDownloadPrefe
|
| +#endif |
| +} |
| + |
| net::URLRequestContextGetter* ChromeConfigurator::RequestContext() const { |
| return configurator_impl_.RequestContext(); |
| } |