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

Unified Diff: chrome/browser/invalidation/ticl_invalidation_service.cc

Issue 327243003: Introduce ProfileInvalidationProvider wrapper for InvalidationService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 6 years, 6 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: chrome/browser/invalidation/ticl_invalidation_service.cc
diff --git a/chrome/browser/invalidation/ticl_invalidation_service.cc b/chrome/browser/invalidation/ticl_invalidation_service.cc
index 487bdb903f7fb2eb2f05c42084c8d8988f0ee4d2..533cc5bb6025689a9f9d8de4307bc34ffd3dceae 100644
--- a/chrome/browser/invalidation/ticl_invalidation_service.cc
+++ b/chrome/browser/invalidation/ticl_invalidation_service.cc
@@ -69,6 +69,12 @@ TiclInvalidationService::TiclInvalidationService(
TiclInvalidationService::~TiclInvalidationService() {
DCHECK(CalledOnValidThread());
+ settings_provider_->RemoveObserver(this);
+ identity_provider_->RemoveActiveAccountRefreshTokenObserver(this);
+ identity_provider_->RemoveObserver(this);
+ if (IsStarted()) {
+ StopInvalidator();
+ }
}
void TiclInvalidationService::Init(
@@ -301,18 +307,6 @@ void TiclInvalidationService::OnIncomingInvalidation(
std::string TiclInvalidationService::GetOwnerName() const { return "TICL"; }
-void TiclInvalidationService::Shutdown() {
- DCHECK(CalledOnValidThread());
- settings_provider_->RemoveObserver(this);
- identity_provider_->RemoveActiveAccountRefreshTokenObserver(this);
- identity_provider_->RemoveObserver(this);
- if (IsStarted()) {
- StopInvalidator();
- }
- invalidation_state_tracker_.reset();
- invalidator_registrar_.reset();
-}
-
bool TiclInvalidationService::IsReadyToStart() {
if (identity_provider_->GetActiveAccountId().empty()) {
DVLOG(2) << "Not starting TiclInvalidationService: User is not signed in.";

Powered by Google App Engine
This is Rietveld 408576698