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

Unified Diff: google_apis/gcm/gcm_client_impl.cc

Issue 270403006: Adding handling of MCS Endpoints to GServicesSettings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing CR feedback Created 6 years, 7 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: google_apis/gcm/gcm_client_impl.cc
diff --git a/google_apis/gcm/gcm_client_impl.cc b/google_apis/gcm/gcm_client_impl.cc
index a0a2142f2167aca1d681e7a320605bdba02f7e11..60c109c84f91351a776559d99106985ecb43b940 100644
--- a/google_apis/gcm/gcm_client_impl.cc
+++ b/google_apis/gcm/gcm_client_impl.cc
@@ -69,13 +69,6 @@ enum MessageType {
SEND_ERROR, // Error sending a message.
};
-// MCS endpoints. SSL Key pinning is done automatically due to the *.google.com
-// pinning rule.
-// Note: modifying the endpoints will affect the ability to compare the
-// GCM.CurrentEnpoint histogram across versions.
-const char kMCSEndpointMain[] = "https://mtalk.google.com:5228";
-const char kMCSEndpointFallback[] = "https://mtalk.google.com:443";
-
const int kMaxRegistrationRetries = 5;
const char kMessageTypeDataMessage[] = "gcm";
const char kMessageTypeDeletedMessagesKey[] = "deleted_messages";
@@ -236,8 +229,8 @@ void GCMClientImpl::OnLoadCompleted(scoped_ptr<GCMStore::LoadResult> result) {
void GCMClientImpl::InitializeMCSClient(
scoped_ptr<GCMStore::LoadResult> result) {
std::vector<GURL> endpoints;
- endpoints.push_back(GURL(kMCSEndpointMain));
- endpoints.push_back(GURL(kMCSEndpointFallback));
+ endpoints.push_back(gservices_settings_.mcs_main_endpoint());
+ endpoints.push_back(gservices_settings_.mcs_fallback_endpoint());
connection_factory_ = internals_builder_->BuildConnectionFactory(
endpoints,
kDefaultBackoffPolicy,

Powered by Google App Engine
This is Rietveld 408576698