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

Side by Side Diff: google_apis/gcm/engine/heartbeat_manager.cc

Issue 1548673002: Switch to standard integer types in google_apis/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 12 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "google_apis/gcm/engine/heartbeat_manager.h" 5 #include "google_apis/gcm/engine/heartbeat_manager.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/power_monitor/power_monitor.h" 10 #include "base/power_monitor/power_monitor.h"
11 #include "base/thread_task_runner_handle.h" 11 #include "base/thread_task_runner_handle.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "base/timer/timer.h" 13 #include "base/timer/timer.h"
14 #include "build/build_config.h"
14 #include "google_apis/gcm/protocol/mcs.pb.h" 15 #include "google_apis/gcm/protocol/mcs.pb.h"
15 #include "net/base/network_change_notifier.h" 16 #include "net/base/network_change_notifier.h"
16 17
17 namespace gcm { 18 namespace gcm {
18 19
19 namespace { 20 namespace {
20 // The default heartbeat when on a mobile or unknown network . 21 // The default heartbeat when on a mobile or unknown network .
21 const int kCellHeartbeatDefaultMs = 1000 * 60 * 28; // 28 minutes. 22 const int kCellHeartbeatDefaultMs = 1000 * 60 * 28; // 28 minutes.
22 // The default heartbeat when on WiFi (also used for ethernet). 23 // The default heartbeat when on WiFi (also used for ethernet).
23 const int kWifiHeartbeatDefaultMs = 1000 * 60 * 15; // 15 minutes. 24 const int kWifiHeartbeatDefaultMs = 1000 * 60 * 15; // 15 minutes.
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 interval <= max_heartbeat_interval; 284 interval <= max_heartbeat_interval;
284 } 285 }
285 286
286 void HeartbeatManager::ResetConnection( 287 void HeartbeatManager::ResetConnection(
287 ConnectionFactory::ConnectionResetReason reason) { 288 ConnectionFactory::ConnectionResetReason reason) {
288 Stop(); 289 Stop();
289 trigger_reconnect_callback_.Run(reason); 290 trigger_reconnect_callback_.Run(reason);
290 } 291 }
291 292
292 } // namespace gcm 293 } // namespace gcm
OLDNEW
« no previous file with comments | « google_apis/gcm/engine/heartbeat_manager.h ('k') | google_apis/gcm/engine/instance_id_delete_token_request_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698