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

Unified Diff: components/update_client/update_query_params_delegate.cc

Issue 1281913002: Componentize ComponentUpdaterConfigurator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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: components/update_client/update_query_params_delegate.cc
diff --git a/components/update_client/update_query_params_delegate.cc b/components/update_client/update_query_params_delegate.cc
index e14665adac3724f2916c9fef9eb13067e433823e..3d343436c632b72faf8fa377f84caf328b32d145 100644
--- a/components/update_client/update_query_params_delegate.cc
+++ b/components/update_client/update_query_params_delegate.cc
@@ -4,6 +4,14 @@
#include "components/update_client/update_query_params_delegate.h"
+namespace {
+const char kUnknown[] = "unknown";
+const char kStable[] = "stable";
+const char kBeta[] = "beta";
+const char kDev[] = "dev";
+const char kCanary[] = "canary";
+}
+
namespace update_client {
UpdateQueryParamsDelegate::UpdateQueryParamsDelegate() {
@@ -12,4 +20,27 @@ UpdateQueryParamsDelegate::UpdateQueryParamsDelegate() {
UpdateQueryParamsDelegate::~UpdateQueryParamsDelegate() {
}
+// static
+const char* UpdateQueryParamsDelegate::GetChannelStringHelper(
+ version_info::Channel channel) {
+ switch (channel) {
+ case version_info::Channel::STABLE:
+ return kStable;
+ break;
+ case version_info::Channel::BETA:
+ return kBeta;
+ break;
+ case version_info::Channel::DEV:
+ return kDev;
+ break;
+ case version_info::Channel::CANARY:
+ return kCanary;
+ break;
+ case version_info::Channel::UNKNOWN:
+ return kUnknown;
+ break;
+ }
+ return kUnknown;
+}
+
} // namespace update_client

Powered by Google App Engine
This is Rietveld 408576698