OLD | NEW |
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 "base/threading/non_thread_safe.h" | 5 #include "base/threading/non_thread_safe.h" |
6 #include "chrome/browser/invalidation/invalidation_service.h" | 6 #include "chrome/browser/invalidation/invalidation_service.h" |
7 #include "components/browser_context_keyed_service/browser_context_keyed_service
.h" | 7 #include "components/browser_context_keyed_service/browser_context_keyed_service
.h" |
8 #include "sync/notifier/object_id_invalidation_map.h" | |
9 | 8 |
10 #ifndef CHROME_BROWSER_INVALIDATION_P2P_INVALIDATION_SERVICE_H_ | 9 #ifndef CHROME_BROWSER_INVALIDATION_P2P_INVALIDATION_SERVICE_H_ |
11 #define CHROME_BROWSER_INVALIDATION_P2P_INVALIDATION_SERVICE_H_ | 10 #define CHROME_BROWSER_INVALIDATION_P2P_INVALIDATION_SERVICE_H_ |
12 | 11 |
13 namespace syncer { | 12 namespace syncer { |
14 class P2PInvalidator; | 13 class P2PInvalidator; |
15 } | 14 } |
16 | 15 |
17 class Profile; | 16 class Profile; |
18 | 17 |
(...skipping 14 matching lines...) Expand all Loading... |
33 | 32 |
34 // InvalidationService implementation. | 33 // InvalidationService implementation. |
35 // It is an error to have registered handlers when Shutdown() is called. | 34 // It is an error to have registered handlers when Shutdown() is called. |
36 virtual void RegisterInvalidationHandler( | 35 virtual void RegisterInvalidationHandler( |
37 syncer::InvalidationHandler* handler) OVERRIDE; | 36 syncer::InvalidationHandler* handler) OVERRIDE; |
38 virtual void UpdateRegisteredInvalidationIds( | 37 virtual void UpdateRegisteredInvalidationIds( |
39 syncer::InvalidationHandler* handler, | 38 syncer::InvalidationHandler* handler, |
40 const syncer::ObjectIdSet& ids) OVERRIDE; | 39 const syncer::ObjectIdSet& ids) OVERRIDE; |
41 virtual void UnregisterInvalidationHandler( | 40 virtual void UnregisterInvalidationHandler( |
42 syncer::InvalidationHandler* handler) OVERRIDE; | 41 syncer::InvalidationHandler* handler) OVERRIDE; |
43 virtual void AcknowledgeInvalidation( | |
44 const invalidation::ObjectId& id, | |
45 const syncer::AckHandle& ack_handle) OVERRIDE; | |
46 virtual syncer::InvalidatorState GetInvalidatorState() const OVERRIDE; | 42 virtual syncer::InvalidatorState GetInvalidatorState() const OVERRIDE; |
47 virtual std::string GetInvalidatorClientId() const OVERRIDE; | 43 virtual std::string GetInvalidatorClientId() const OVERRIDE; |
48 | 44 |
49 void UpdateCredentials(const std::string& username, | 45 void UpdateCredentials(const std::string& username, |
50 const std::string& password); | 46 const std::string& password); |
51 | 47 |
52 void SendInvalidation(const syncer::ObjectIdSet& ids); | 48 void SendInvalidation(const syncer::ObjectIdSet& ids); |
53 | 49 |
54 private: | 50 private: |
55 scoped_ptr<syncer::P2PInvalidator> invalidator_; | 51 scoped_ptr<syncer::P2PInvalidator> invalidator_; |
56 std::string invalidator_id_; | 52 std::string invalidator_id_; |
57 | 53 |
58 DISALLOW_COPY_AND_ASSIGN(P2PInvalidationService); | 54 DISALLOW_COPY_AND_ASSIGN(P2PInvalidationService); |
59 }; | 55 }; |
60 | 56 |
61 } // namespace invalidation | 57 } // namespace invalidation |
62 | 58 |
63 #endif // CHROME_BROWSER_INVALIDATION_P2P_INVALIDATION_SERVICE_H_ | 59 #endif // CHROME_BROWSER_INVALIDATION_P2P_INVALIDATION_SERVICE_H_ |
OLD | NEW |