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

Unified Diff: chrome/browser/services/gcm/gcm_desktop_utils.cc

Issue 653843003: [GCM] Start GCMChannelStatusSyncer when GCM is disabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for GCM not reenabled after being disabled on the fly Created 6 years, 2 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
« no previous file with comments | « no previous file | components/gcm_driver/gcm_channel_status_request.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/services/gcm/gcm_desktop_utils.cc
diff --git a/chrome/browser/services/gcm/gcm_desktop_utils.cc b/chrome/browser/services/gcm/gcm_desktop_utils.cc
index fa66bb35d361af0afc96583085e6329e147a7ad0..83ee33cb15257fd44579b3d635b5fb373845f90f 100644
--- a/chrome/browser/services/gcm/gcm_desktop_utils.cc
+++ b/chrome/browser/services/gcm/gcm_desktop_utils.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/services/gcm/gcm_desktop_utils.h"
+#include "base/command_line.h"
#include "base/logging.h"
#include "base/sequenced_task_runner.h"
#include "base/threading/sequenced_worker_pool.h"
@@ -20,6 +21,8 @@ namespace gcm {
namespace {
+const char kChannelStatusRelativePath[] = "/experimentstatus";
+
GCMClient::ChromePlatform GetPlatform() {
#if defined(OS_WIN)
return GCMClient::PLATFORM_WIN;
@@ -72,13 +75,9 @@ GCMClient::ChromeBuildInfo GetChromeBuildInfo() {
}
std::string GetChannelStatusRequestUrl() {
- chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
- if (channel == chrome::VersionInfo::CHANNEL_STABLE ||
- channel == chrome::VersionInfo::CHANNEL_BETA) {
- return ProfileSyncService::kSyncServerUrl;
- }
-
- return ProfileSyncService::kDevServerUrl;
+ GURL sync_url(
+ ProfileSyncService::GetSyncServiceURL(*CommandLine::ForCurrentProcess()));
+ return sync_url.spec() + kChannelStatusRelativePath;
}
std::string GetUserAgent() {
« no previous file with comments | « no previous file | components/gcm_driver/gcm_channel_status_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698