OLD | NEW |
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_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_INVALIDATION
_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_INVALIDATION
_HANDLER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_INVALIDATION
_HANDLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_INVALIDATION
_HANDLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 virtual void SuppressInitialInvalidationsForExtension( | 42 virtual void SuppressInitialInvalidationsForExtension( |
43 const std::string& extension_id) OVERRIDE; | 43 const std::string& extension_id) OVERRIDE; |
44 virtual void RegisterExtension(const std::string& extension_id) OVERRIDE; | 44 virtual void RegisterExtension(const std::string& extension_id) OVERRIDE; |
45 virtual void UnregisterExtension(const std::string& extension_id) OVERRIDE; | 45 virtual void UnregisterExtension(const std::string& extension_id) OVERRIDE; |
46 | 46 |
47 // InvalidationHandler implementation. | 47 // InvalidationHandler implementation. |
48 virtual void OnInvalidatorStateChange( | 48 virtual void OnInvalidatorStateChange( |
49 syncer::InvalidatorState state) OVERRIDE; | 49 syncer::InvalidatorState state) OVERRIDE; |
50 virtual void OnIncomingInvalidation( | 50 virtual void OnIncomingInvalidation( |
51 const syncer::ObjectIdInvalidationMap& invalidation_map) OVERRIDE; | 51 const syncer::ObjectIdInvalidationMap& invalidation_map) OVERRIDE; |
| 52 virtual std::string GetOwnerName() const OVERRIDE; |
52 | 53 |
53 const std::set<std::string>& GetRegisteredExtensionsForTest() const { | 54 const std::set<std::string>& GetRegisteredExtensionsForTest() const { |
54 return registered_extensions_; | 55 return registered_extensions_; |
55 } | 56 } |
56 | 57 |
57 private: | 58 private: |
58 void UpdateRegistrations(); | 59 void UpdateRegistrations(); |
59 | 60 |
60 base::ThreadChecker thread_checker_; | 61 base::ThreadChecker thread_checker_; |
61 invalidation::InvalidationService* const service_; | 62 invalidation::InvalidationService* const service_; |
62 std::set<std::string> registered_extensions_; | 63 std::set<std::string> registered_extensions_; |
63 syncer::ObjectIdSet suppressed_ids_; | 64 syncer::ObjectIdSet suppressed_ids_; |
64 PushMessagingInvalidationHandlerDelegate* const delegate_; | 65 PushMessagingInvalidationHandlerDelegate* const delegate_; |
65 std::map<invalidation::ObjectId, | 66 std::map<invalidation::ObjectId, |
66 int64, | 67 int64, |
67 syncer::ObjectIdLessThan> max_object_version_map_; | 68 syncer::ObjectIdLessThan> max_object_version_map_; |
68 | 69 |
69 DISALLOW_COPY_AND_ASSIGN(PushMessagingInvalidationHandler); | 70 DISALLOW_COPY_AND_ASSIGN(PushMessagingInvalidationHandler); |
70 }; | 71 }; |
71 | 72 |
72 } // namespace extensions | 73 } // namespace extensions |
73 | 74 |
74 #endif // CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_INVALIDAT
ION_HANDLER_H_ | 75 #endif // CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_INVALIDAT
ION_HANDLER_H_ |
OLD | NEW |