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 ad02a4d80d36cc04ba0624dfb2a59f3239980447..325226fc1602989e1a3876192df7495fdf971908 100644 |
--- a/google_apis/gcm/gcm_client_impl.cc |
+++ b/google_apis/gcm/gcm_client_impl.cc |
@@ -67,7 +67,13 @@ enum MessageType { |
SEND_ERROR, // Error sending a message. |
}; |
-const char kMCSEndpoint[] = "https://mtalk.google.com:5228"; |
+// 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"; |
@@ -189,8 +195,11 @@ void GCMClientImpl::InitializeMCSClient( |
GetNetworkSessionParams(); |
DCHECK(network_session_params); |
network_session_ = new net::HttpNetworkSession(*network_session_params); |
+ std::vector<GURL> endpoints; |
+ endpoints.push_back(GURL(kMCSEndpointMain)); |
+ endpoints.push_back(GURL(kMCSEndpointFallback)); |
connection_factory_.reset(new ConnectionFactoryImpl( |
- GURL(kMCSEndpoint), |
+ endpoints, |
kDefaultBackoffPolicy, |
network_session_, |
net_log_.net_log())); |