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

Unified Diff: chrome/browser/extensions/updater/chrome_update_client_config.cc

Issue 1362043005: Add extensions code to use common updater in components/update_client/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: responded to review comments Created 5 years, 3 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/extensions/updater/chrome_update_client_config.cc
diff --git a/chrome/browser/extensions/updater/chrome_update_client_config.cc b/chrome/browser/extensions/updater/chrome_update_client_config.cc
new file mode 100644
index 0000000000000000000000000000000000000000..027685a64f48534c9640f1cb272b397161414f34
--- /dev/null
+++ b/chrome/browser/extensions/updater/chrome_update_client_config.cc
@@ -0,0 +1,45 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/extensions/updater/chrome_update_client_config.h"
+
+#include "base/version.h"
+#include "chrome/browser/browser_process.h"
+#include "chrome/browser/update_client/chrome_update_query_params_delegate.h"
+#include "chrome/common/channel_info.h"
+#include "components/component_updater/component_updater_url_constants.h"
+#include "components/version_info/version_info.h"
+#include "url/gurl.h"
+
+namespace extensions {
+
+ChromeUpdateClientConfig::ChromeUpdateClientConfig(
+ content::BrowserContext* context)
+ : UpdateClientConfig(context) {}
+
+std::vector<GURL> ChromeUpdateClientConfig::UpdateUrl() const {
+ std::vector<GURL> result;
+ result.push_back(GURL(component_updater::kUpdaterDefaultUrl));
+ return result;
+}
+
+std::vector<GURL> ChromeUpdateClientConfig::PingUrl() const {
+ return UpdateUrl();
+}
+
+base::Version ChromeUpdateClientConfig::GetBrowserVersion() const {
+ return base::Version(version_info::GetVersionNumber());
+}
+
+std::string ChromeUpdateClientConfig::GetChannel() const {
+ return chrome::GetChannelString();
+}
+
+std::string ChromeUpdateClientConfig::GetLang() const {
+ return ChromeUpdateQueryParamsDelegate::GetLang();
+}
+
+ChromeUpdateClientConfig::~ChromeUpdateClientConfig() {}
+
+} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698