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

Side by Side Diff: chrome/browser/sync/profile_sync_service_observer.h

Issue 612573005: [Sync] Clean up ProfileSyncService observer events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_OBSERVER_H_ 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_OBSERVER_H_
6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_OBSERVER_H_ 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_OBSERVER_H_
7 7
8 // Various UI components such as the New Tab page can be driven by observing 8 // Various UI components such as the New Tab page can be driven by observing
9 // the ProfileSyncService through this interface. 9 // the ProfileSyncService through this interface.
10 class ProfileSyncServiceObserver { 10 class ProfileSyncServiceObserver {
11 public: 11 public:
12 // When one of the following events occurs, OnStateChanged() is called. 12 // When one of the following events occurs, OnStateChanged() is called.
13 // Observers should query the service to determine what happened. 13 // Observers should query the service to determine what happened.
14 // - We initialized successfully. 14 // - We initialized successfully.
15 // - There was an authentication error and the user needs to reauthenticate.
16 // - The sync servers are unavailable at this time. 15 // - The sync servers are unavailable at this time.
17 // - Credentials are now in flight for authentication. 16 // - Credentials are now in flight for authentication.
17 // - The data type configuration has started or ended.
18 // - Sync shut down.
19 // - Sync errors (passphrase, auth, unrecoverable, actionable, etc.).
20 // - Encryption changes.
18 virtual void OnStateChanged() = 0; 21 virtual void OnStateChanged() = 0;
19 22
20 // If a client wishes to handle sync cycle completed events in a special way, 23 // If a client wishes to handle sync cycle completed events in a special way,
21 // they can use this function. By default, it re-routes to OnStateChanged(). 24 // they can use this function. By default, it re-routes to OnStateChanged().
22 virtual void OnSyncCycleCompleted(); 25 virtual void OnSyncCycleCompleted();
23 26
24 protected: 27 protected:
25 virtual ~ProfileSyncServiceObserver() { } 28 virtual ~ProfileSyncServiceObserver() { }
26 }; 29 };
27 30
28 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_OBSERVER_H_ 31 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698