| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chrome/browser/invalidation/ticl_invalidation_service.h" | 5 #include "chrome/browser/invalidation/ticl_invalidation_service.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "chrome/browser/invalidation/gcm_invalidation_bridge.h" | 9 #include "chrome/browser/invalidation/gcm_invalidation_bridge.h" |
| 10 #include "chrome/common/chrome_content_client.h" | 10 #include "chrome/common/chrome_content_client.h" |
| 11 #include "components/gcm_driver/gcm_driver.h" | 11 #include "components/gcm_driver/gcm_driver.h" |
| 12 #include "components/invalidation/invalidation_service_util.h" | 12 #include "components/invalidation/invalidation_service_util.h" |
| 13 #include "components/invalidation/non_blocking_invalidator.h" | |
| 14 #include "google_apis/gaia/gaia_constants.h" | 13 #include "google_apis/gaia/gaia_constants.h" |
| 15 #include "net/url_request/url_request_context_getter.h" | 14 #include "net/url_request/url_request_context_getter.h" |
| 16 #include "sync/internal_api/public/base/invalidator_state.h" | 15 #include "sync/notifier/gcm_network_channel_delegate.h" |
| 17 #include "sync/notifier/invalidation_util.h" | 16 #include "sync/notifier/invalidation_util.h" |
| 18 #include "sync/notifier/invalidator.h" | 17 #include "sync/notifier/invalidator.h" |
| 18 #include "sync/notifier/invalidator_state.h" |
| 19 #include "sync/notifier/non_blocking_invalidator.h" |
| 19 #include "sync/notifier/object_id_invalidation_map.h" | 20 #include "sync/notifier/object_id_invalidation_map.h" |
| 20 | 21 |
| 21 static const char* kOAuth2Scopes[] = { | 22 static const char* kOAuth2Scopes[] = { |
| 22 GaiaConstants::kGoogleTalkOAuth2Scope | 23 GaiaConstants::kGoogleTalkOAuth2Scope |
| 23 }; | 24 }; |
| 24 | 25 |
| 25 static const net::BackoffEntry::Policy kRequestAccessTokenBackoffPolicy = { | 26 static const net::BackoffEntry::Policy kRequestAccessTokenBackoffPolicy = { |
| 26 // Number of initial errors (in sequence) to ignore before applying | 27 // Number of initial errors (in sequence) to ignore before applying |
| 27 // exponential back-off rules. | 28 // exponential back-off rules. |
| 28 0, | 29 0, |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 } | 433 } |
| 433 | 434 |
| 434 void TiclInvalidationService::StopInvalidator() { | 435 void TiclInvalidationService::StopInvalidator() { |
| 435 DCHECK(invalidator_); | 436 DCHECK(invalidator_); |
| 436 gcm_invalidation_bridge_.reset(); | 437 gcm_invalidation_bridge_.reset(); |
| 437 invalidator_->UnregisterHandler(this); | 438 invalidator_->UnregisterHandler(this); |
| 438 invalidator_.reset(); | 439 invalidator_.reset(); |
| 439 } | 440 } |
| 440 | 441 |
| 441 } // namespace invalidation | 442 } // namespace invalidation |
| OLD | NEW |