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

Side by Side Diff: chrome/browser/sync/notifier/sync_notifier.h

Issue 6621062: Refactor sync notifier out of sync api. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Minox fixes. Created 9 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 //
5 // Interface to the sync notifier, which is an object that receives
6 // notifications when updates are available for a set of sync types.
7 // All the observers are notified when such an event happens.
8
9 #ifndef CHROME_BROWSER_SYNC_NOTIFIER_SYNC_NOTIFIER_H_
10 #define CHROME_BROWSER_SYNC_NOTIFIER_SYNC_NOTIFIER_H_
11
12 #include <string>
13
14 #include "chrome/browser/sync/syncable/model_type.h"
15
16 namespace sync_notifier {
17 class SyncNotifierObserver;
18
19 class SyncNotifier {
20 public:
21 SyncNotifier() {}
22 virtual ~SyncNotifier() {}
23
24 virtual void AddObserver(SyncNotifierObserver* observer) = 0;
25 virtual void RemoveObserver(SyncNotifierObserver* observer) = 0;
26
27 // SetState must be called once, before any call to UpdateCredentials.
28 virtual void SetState(const std::string& state) = 0;
29
30 // The observers won't be notified of any notifications until
31 // UpdateCredentials is called at least once. It can be called more than
32 // once.
33 virtual void UpdateCredentials(
34 const std::string& email, const std::string& token) = 0;
35
36 virtual void UpdateEnabledTypes(const syncable::ModelTypeSet& types) = 0;
37
38 // This is here only to support the old p2p notification implementation,
39 // which is still used by sync integration tests.
40 // TODO(akalin): Remove this once we move the integration tests off p2p
41 // notifications.
42 virtual void SendNotification() = 0;
43 };
44 } // namespace sync_notifier
45
46 #endif // CHROME_BROWSER_SYNC_NOTIFIER_SYNC_NOTIFIER_H_
47
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host.cc ('k') | chrome/browser/sync/notifier/sync_notifier_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698