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

Unified Diff: google_apis/gcm/engine/connection_handler_impl.cc

Issue 171683002: [GCM] Fix gcm login to properly identify chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Self review Created 6 years, 10 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/engine/connection_handler_impl.cc
diff --git a/google_apis/gcm/engine/connection_handler_impl.cc b/google_apis/gcm/engine/connection_handler_impl.cc
index b51159623c9c98c2c3112aa13b337af1f184ef2f..be2c313be2e297bccc9f22e4837be22ac86457a1 100644
--- a/google_apis/gcm/engine/connection_handler_impl.cc
+++ b/google_apis/gcm/engine/connection_handler_impl.cc
@@ -27,8 +27,7 @@ const int kSizePacketLenMin = 1;
const int kSizePacketLenMax = 2;
// The current MCS protocol version.
-// TODO(zea): bump to 41 once the server supports it.
-const int kMCSVersion = 38;
+const int kMCSVersion = 41;
} // namespace
@@ -263,7 +262,8 @@ void ConnectionHandlerImpl::OnGotVersion() {
CodedInputStream coded_input_stream(input_stream_.get());
coded_input_stream.ReadRaw(&version, 1);
}
- if (version < kMCSVersion) {
+ // TODO(zea): remove this when the server is ready.
+ if (version < kMCSVersion && version != 38) {
jianli 2014/02/19 00:08:26 Why do we need to check for this? What's current v
Nicolas Zea 2014/02/19 18:40:28 A server bug that hasn't been fixed yet results in
LOG(ERROR) << "Invalid GCM version response: " << static_cast<int>(version);
connection_callback_.Run(net::ERR_FAILED);
return;

Powered by Google App Engine
This is Rietveld 408576698