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

Unified Diff: google_apis/gcm/gcm_client_impl.cc

Issue 206873006: [GCM] Add port 443 fallback logic and histograms (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | « google_apis/gcm/engine/connection_factory_impl_unittest.cc ('k') | google_apis/gcm/tools/mcs_probe.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()));
« no previous file with comments | « google_apis/gcm/engine/connection_factory_impl_unittest.cc ('k') | google_apis/gcm/tools/mcs_probe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698