Files
cromite/build/patches/google-cloud-messaging-disable-experiment-status-check.patch
T
2019-01-01 13:30:36 +01:00

45 lines
1.5 KiB
Diff

From: Joachim Bauch <jojo@struktur.de>
Date: Mon, 1 Jun 2015 17:14:34 +0200
Subject: google-cloud-messaging: disable experiment status check
This avoids trk:263 from triggering.
---
components/gcm_driver/gcm_channel_status_request.cc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/components/gcm_driver/gcm_channel_status_request.cc b/components/gcm_driver/gcm_channel_status_request.cc
--- a/components/gcm_driver/gcm_channel_status_request.cc
+++ b/components/gcm_driver/gcm_channel_status_request.cc
@@ -24,8 +24,10 @@ namespace gcm {
namespace {
+#if 0
const char kRequestContentType[] = "application/octet-stream";
const char kGCMChannelTag[] = "gcm_channel";
+#endif
const int kDefaultPollIntervalSeconds = 60 * 60; // 60 minutes.
const int kMinPollIntervalSeconds = 30 * 60; // 30 minutes.
@@ -58,6 +60,7 @@ int GCMChannelStatusRequest::min_poll_interval_seconds() {
void GCMChannelStatusRequest::Start() {
// url_loader_factory_ can be null for tests.
+#if 0
if (!url_loader_factory_)
return;
@@ -113,6 +116,9 @@ void GCMChannelStatusRequest::Start() {
net::LOAD_DO_NOT_SEND_COOKIES | net::LOAD_DO_NOT_SAVE_COOKIES;
resource_request->method = "POST";
resource_request->headers.SetHeader(net::HttpRequestHeaders::kUserAgent,
+#endif
+ // Simulate an empty response and disable GCM.
+ callback_.Run(false, false, 0);
user_agent_);
// TODO(https://crbug.com/808498): Re-add data use measurement once
// SimpleURLLoader supports it.
--
2.11.0