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

Unified Diff: components/update_client/update_query_params.cc

Issue 1281913002: Componentize ComponentUpdaterConfigurator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments 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.cc
diff --git a/components/update_client/update_query_params.cc b/components/update_client/update_query_params.cc
index 33bd00e197cf711cede869036974a054c40955fd..7effc237df7bd6d20472754d0ded4ab7dd9f4df9 100644
--- a/components/update_client/update_query_params.cc
+++ b/components/update_client/update_query_params.cc
@@ -15,6 +15,10 @@ namespace update_client {
namespace {
const char kUnknown[] = "unknown";
+const char kStable[] = "stable";
+const char kBeta[] = "beta";
+const char kDev[] = "dev";
+const char kCanary[] = "canary";
// The request extra information is the OS and architecture, this helps
// the server select the right package to be delivered.
@@ -128,4 +132,26 @@ void UpdateQueryParams::SetDelegate(UpdateQueryParamsDelegate* delegate) {
g_delegate = delegate;
}
+// static
+const char* UpdateQueryParams::GetChannelString(version_info::Channel channel) {
sdefresne 2015/08/13 12:20:00 This is duplicating version_info::GetChannelString
droger 2015/08/13 13:17:46 Done, using version_info instead, which actually s
Sorin Jianu 2015/08/13 18:24:11 It appears that sdefresne@ componentized version_i
+ 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