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

Side by Side Diff: components/invalidation/invalidation_notifier.h

Issue 294123004: Move some sync/notifier to components/invalidation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 // An implementation of Invalidator that wraps an invalidation 5 // An implementation of Invalidator that wraps an invalidation
6 // client. Handles the details of connecting to XMPP and hooking it 6 // client. Handles the details of connecting to XMPP and hooking it
7 // up to the invalidation client. 7 // up to the invalidation client.
8 // 8 //
9 // You probably don't want to use this directly; use 9 // You probably don't want to use this directly; use
10 // NonBlockingInvalidator. 10 // NonBlockingInvalidator.
11 11
12 #ifndef SYNC_NOTIFIER_INVALIDATION_NOTIFIER_H_ 12 #ifndef COMPONENTS_INVALIDATION_INVALIDATION_NOTIFIER_H_
13 #define SYNC_NOTIFIER_INVALIDATION_NOTIFIER_H_ 13 #define COMPONENTS_INVALIDATION_INVALIDATION_NOTIFIER_H_
14 14
15 #include <string> 15 #include <string>
16 16
17 #include "base/basictypes.h" 17 #include "base/basictypes.h"
18 #include "base/compiler_specific.h" 18 #include "base/compiler_specific.h"
19 #include "base/memory/scoped_ptr.h" 19 #include "base/memory/scoped_ptr.h"
20 #include "base/threading/non_thread_safe.h" 20 #include "base/threading/non_thread_safe.h"
21 #include "sync/base/sync_export.h" 21 #include "components/invalidation/invalidation_export.h"
22 #include "components/invalidation/invalidator_registrar.h"
23 #include "components/invalidation/sync_invalidation_listener.h"
22 #include "sync/internal_api/public/base/model_type.h" 24 #include "sync/internal_api/public/base/model_type.h"
23 #include "sync/internal_api/public/util/weak_handle.h" 25 #include "sync/internal_api/public/util/weak_handle.h"
24 #include "sync/notifier/invalidation_state_tracker.h" 26 #include "sync/notifier/invalidation_state_tracker.h"
25 #include "sync/notifier/invalidator.h" 27 #include "sync/notifier/invalidator.h"
26 #include "sync/notifier/invalidator_registrar.h"
27 #include "sync/notifier/sync_invalidation_listener.h"
28 28
29 namespace notifier { 29 namespace notifier {
30 class PushClient; 30 class PushClient;
31 } // namespace notifier 31 } // namespace notifier
32 32
33 namespace syncer { 33 namespace syncer {
34 34
35 // This class must live on the IO thread. 35 // This class must live on the IO thread.
36 class SYNC_EXPORT_PRIVATE InvalidationNotifier 36 class INVALIDATION_EXPORT_PRIVATE InvalidationNotifier
37 : public Invalidator, 37 : public Invalidator,
38 public SyncInvalidationListener::Delegate, 38 public SyncInvalidationListener::Delegate,
39 public base::NonThreadSafe { 39 public base::NonThreadSafe {
40 public: 40 public:
41 // |invalidation_state_tracker| must be initialized. 41 // |invalidation_state_tracker| must be initialized.
42 InvalidationNotifier( 42 InvalidationNotifier(
43 scoped_ptr<SyncNetworkChannel> network_channel, 43 scoped_ptr<SyncNetworkChannel> network_channel,
44 const std::string& invalidator_client_id, 44 const std::string& invalidator_client_id,
45 const UnackedInvalidationsMap& saved_invalidations, 45 const UnackedInvalidationsMap& saved_invalidations,
46 const std::string& invalidation_bootstrap_data, 46 const std::string& invalidation_bootstrap_data,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 const std::string invalidation_bootstrap_data_; 98 const std::string invalidation_bootstrap_data_;
99 99
100 // The invalidation listener. 100 // The invalidation listener.
101 SyncInvalidationListener invalidation_listener_; 101 SyncInvalidationListener invalidation_listener_;
102 102
103 DISALLOW_COPY_AND_ASSIGN(InvalidationNotifier); 103 DISALLOW_COPY_AND_ASSIGN(InvalidationNotifier);
104 }; 104 };
105 105
106 } // namespace syncer 106 } // namespace syncer
107 107
108 #endif // SYNC_NOTIFIER_INVALIDATION_NOTIFIER_H_ 108 #endif // COMPONENTS_INVALIDATION_INVALIDATION_NOTIFIER_H_
OLDNEW
« no previous file with comments | « components/invalidation/invalidation_logger_observer.h ('k') | components/invalidation/invalidation_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698