Files
cromite/patches/privacy/disable-gcm-status-check.patch
2017-10-12 00:10:45 +02:00

40 lines
1.3 KiB
Diff

commit fd5c89a560c1fcbab8cd9b7335aca75a2d22d1e5
Author: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Wed Oct 11 22:58:52 2017 +0200
Disable GCM status check
diff --git a/components/gcm_driver/gcm_channel_status_request.cc b/components/gcm_driver/gcm_channel_status_request.cc
index 8972447..415b1ab 100644
--- a/components/gcm_driver/gcm_channel_status_request.cc
+++ b/components/gcm_driver/gcm_channel_status_request.cc
@@ -23,8 +23,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.
@@ -57,6 +59,7 @@ int GCMChannelStatusRequest::min_poll_interval_seconds() {
}
void GCMChannelStatusRequest::Start() {
+#if 0
DCHECK(!url_fetcher_.get());
GURL request_url(channel_status_request_url_);
@@ -112,6 +115,9 @@ void GCMChannelStatusRequest::Start() {
url_fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES |
net::LOAD_DO_NOT_SAVE_COOKIES);
url_fetcher_->Start();
+#endif
+ // Simulate an empty response and disable GCM.
+ callback_.Run(false, false, 0);
}
void GCMChannelStatusRequest::OnURLFetchComplete(