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

Side by Side Diff: sync/notifier/sync_notifier_factory.h

Issue 10875064: Rename SyncNotifier->Invalidator and SyncNotifierObserver->InvalidationHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to ToT for landing Created 8 years, 3 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
« no previous file with comments | « sync/notifier/sync_notifier.h ('k') | sync/notifier/sync_notifier_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef SYNC_NOTIFIER_SYNC_NOTIFIER_FACTORY_H_
6 #define SYNC_NOTIFIER_SYNC_NOTIFIER_FACTORY_H_
7
8 #include <string>
9
10 #include "base/memory/weak_ptr.h"
11 #include "jingle/notifier/base/notifier_options.h"
12 #include "sync/internal_api/public/util/weak_handle.h"
13 #include "sync/notifier/invalidation_state_tracker.h"
14
15 namespace syncer {
16
17 class SyncNotifier;
18
19 // Class to instantiate various implementations of the SyncNotifier
20 // interface.
21 class SyncNotifierFactory {
22 public:
23 // |client_info| is a string identifying the client, e.g. a user
24 // agent string. |invalidation_state_tracker| may be NULL (for
25 // tests).
26 SyncNotifierFactory(
27 const notifier::NotifierOptions& notifier_options,
28 const std::string& client_info,
29 const base::WeakPtr<InvalidationStateTracker>&
30 invalidation_state_tracker);
31 ~SyncNotifierFactory();
32
33 // Creates a sync notifier. Caller takes ownership of the returned
34 // object. However, the returned object must not outlive the
35 // factory from which it was created. Can be called on any thread.
36 SyncNotifier* CreateSyncNotifier();
37
38 private:
39 const notifier::NotifierOptions notifier_options_;
40 const std::string client_info_;
41 const InvalidationVersionMap initial_max_invalidation_versions_;
42 const std::string initial_invalidation_state_;
43 const WeakHandle<InvalidationStateTracker>
44 invalidation_state_tracker_;
45 };
46
47 } // namespace syncer
48
49 #endif // SYNC_NOTIFIER_SYNC_NOTIFIER_FACTORY_H_
OLDNEW
« no previous file with comments | « sync/notifier/sync_notifier.h ('k') | sync/notifier/sync_notifier_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698