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

Unified Diff: google_apis/gcm/gcm_client_impl.cc

Issue 205343003: [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
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 5663eae1aead7fd2dd604d4d2da0f05d0007fc36..9e129d2f9108ac9476f1d1f9ae5255a1d4308497 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://bla.google.com:5228";
fgorski 2014/03/20 16:45:42 bla.google.com?
Nicolas Zea 2014/03/20 20:10:02 Whoops, good catch, that was from some manual test
+const char kMCSEndpointFallback[] = "https://mtalk.google.com:443";
+
const int kMaxRegistrationRetries = 5;
const char kMessageTypeDataMessage[] = "gcm";
const char kMessageTypeDeletedMessagesKey[] = "deleted_messages";
@@ -186,8 +192,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()));

Powered by Google App Engine
This is Rietveld 408576698