| Index: chrome/browser/component_updater/component_updater_configurator.cc
|
| diff --git a/chrome/browser/component_updater/component_updater_configurator.cc b/chrome/browser/component_updater/component_updater_configurator.cc
|
| index 65b1f8599aafa2cb412af9024078816a61d3f83e..87046bf1bfbf3a65ef1157c2723233371ef38445 100644
|
| --- a/chrome/browser/component_updater/component_updater_configurator.cc
|
| +++ b/chrome/browser/component_updater/component_updater_configurator.cc
|
| @@ -17,6 +17,10 @@
|
| #include "chrome/common/chrome_switches.h"
|
| #include "net/url_request/url_request_context_getter.h"
|
|
|
| +#if defined(OS_WIN)
|
| +#include "chrome/browser/component_updater/component_patcher_win.h"
|
| +#endif
|
| +
|
| namespace component_updater {
|
|
|
| namespace {
|
| @@ -49,10 +53,9 @@
|
| // The url to send the pings to.
|
| const char kPingUrl[] = "http:" COMPONENT_UPDATER_SERVICE_ENDPOINT;
|
|
|
| +#if defined(OS_WIN)
|
| // Disables differential updates.
|
| const char kSwitchDisableDeltaUpdates[] = "disable-delta-updates";
|
| -
|
| -#if defined(OS_WIN)
|
| // Disables background downloads.
|
| const char kSwitchDisableBackgroundDownloads[] = "disable-background-downloads";
|
| #endif // defined(OS_WIN)
|
| @@ -106,6 +109,7 @@
|
| virtual size_t UrlSizeLimit() OVERRIDE;
|
| virtual net::URLRequestContextGetter* RequestContext() OVERRIDE;
|
| virtual bool InProcess() OVERRIDE;
|
| + virtual ComponentPatcher* CreateComponentPatcher() OVERRIDE;
|
| virtual bool DeltasEnabled() const OVERRIDE;
|
| virtual bool UseBackgroundDownloader() const OVERRIDE;
|
|
|
| @@ -132,12 +136,12 @@
|
| ",", &switch_values);
|
| fast_update_ = HasSwitchValue(switch_values, kSwitchFastUpdate);
|
| pings_enabled_ = !HasSwitchValue(switch_values, kSwitchDisablePings);
|
| +#if defined(OS_WIN)
|
| deltas_enabled_ = !HasSwitchValue(switch_values, kSwitchDisableDeltaUpdates);
|
| -
|
| -#if defined(OS_WIN)
|
| background_downloads_enabled_ =
|
| !HasSwitchValue(switch_values, kSwitchDisableBackgroundDownloads);
|
| #else
|
| + deltas_enabled_ = false;
|
| background_downloads_enabled_ = false;
|
| #endif
|
|
|
| @@ -198,6 +202,14 @@
|
| return false;
|
| }
|
|
|
| +ComponentPatcher* ChromeConfigurator::CreateComponentPatcher() {
|
| +#if defined(OS_WIN)
|
| + return new ComponentPatcherWin();
|
| +#else
|
| + return new ComponentPatcherCrossPlatform();
|
| +#endif
|
| +}
|
| +
|
| bool ChromeConfigurator::DeltasEnabled() const {
|
| return deltas_enabled_;
|
| }
|
|
|