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

Unified Diff: chrome/browser/component_updater/component_updater_configurator.cc

Issue 213923002: Revert of Use UtilityProcessHost to patch files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nonblocking
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
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_;
}
« no previous file with comments | « chrome/browser/component_updater/component_unpacker.cc ('k') | chrome/browser/component_updater/component_updater_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698