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

Side by Side Diff: chrome/browser/sync/sync_startup_tracker.cc

Issue 197243002: Make SyncStartupTracker::Observer destructor virtual (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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 (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/sync/sync_startup_tracker.h"
6
5 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
6 #include "chrome/browser/sync/profile_sync_service.h" 8 #include "chrome/browser/sync/profile_sync_service.h"
7 #include "chrome/browser/sync/profile_sync_service_factory.h" 9 #include "chrome/browser/sync/profile_sync_service_factory.h"
8 #include "chrome/browser/sync/sync_startup_tracker.h"
9 10
10 SyncStartupTracker::SyncStartupTracker(Profile* profile, Observer* observer) 11 SyncStartupTracker::SyncStartupTracker(Profile* profile, Observer* observer)
11 : profile_(profile), 12 : profile_(profile),
12 observer_(observer) { 13 observer_(observer) {
13 ProfileSyncService* service = ProfileSyncServiceFactory::GetForProfile( 14 ProfileSyncService* service = ProfileSyncServiceFactory::GetForProfile(
14 profile_); 15 profile_);
15 if (service) 16 if (service)
16 service->AddObserver(this); 17 service->AddObserver(this);
17 18
18 CheckServiceState(); 19 CheckServiceState();
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // to be fetched, exit. 74 // to be fetched, exit.
74 if (!service->waiting_for_auth() && 75 if (!service->waiting_for_auth() &&
75 service->GetAuthError().state() != GoogleServiceAuthError::NONE) { 76 service->GetAuthError().state() != GoogleServiceAuthError::NONE) {
76 return SYNC_STARTUP_ERROR; 77 return SYNC_STARTUP_ERROR;
77 } 78 }
78 79
79 // No error detected yet, but the sync backend hasn't started up yet, so 80 // No error detected yet, but the sync backend hasn't started up yet, so
80 // we're in the pending state. 81 // we're in the pending state.
81 return SYNC_STARTUP_PENDING; 82 return SYNC_STARTUP_PENDING;
82 } 83 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_startup_tracker.h ('k') | chrome/browser/sync/sync_startup_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698