| OLD | NEW |
| 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 #ifndef SYNC_NOTIFIER_INVALIDATOR_FACTORY_H_ | 5 #ifndef SYNC_NOTIFIER_INVALIDATOR_FACTORY_H_ |
| 6 #define SYNC_NOTIFIER_INVALIDATOR_FACTORY_H_ | 6 #define SYNC_NOTIFIER_INVALIDATOR_FACTORY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 const std::string& client_info, | 29 const std::string& client_info, |
| 30 const base::WeakPtr<InvalidationStateTracker>& | 30 const base::WeakPtr<InvalidationStateTracker>& |
| 31 invalidation_state_tracker); | 31 invalidation_state_tracker); |
| 32 ~InvalidatorFactory(); | 32 ~InvalidatorFactory(); |
| 33 | 33 |
| 34 // Creates an invalidator. Caller takes ownership of the returned | 34 // Creates an invalidator. Caller takes ownership of the returned |
| 35 // object. However, the returned object must not outlive the | 35 // object. However, the returned object must not outlive the |
| 36 // factory from which it was created. Can be called on any thread. | 36 // factory from which it was created. Can be called on any thread. |
| 37 Invalidator* CreateInvalidator(); | 37 Invalidator* CreateInvalidator(); |
| 38 | 38 |
| 39 // Returns the unique ID that was (or will be) passed to the invalidator. |
| 40 std::string GetInvalidatorClientId() const; |
| 41 |
| 39 private: | 42 private: |
| 40 const notifier::NotifierOptions notifier_options_; | 43 const notifier::NotifierOptions notifier_options_; |
| 44 |
| 45 // Some of these should be const, but can't be set up in member initializers. |
| 46 InvalidationStateMap initial_invalidation_state_map_; |
| 41 const std::string client_info_; | 47 const std::string client_info_; |
| 42 const InvalidationStateMap initial_invalidation_state_map_; | 48 std::string invalidator_client_id_; |
| 43 const std::string invalidation_bootstrap_data_; | 49 std::string invalidation_bootstrap_data_; |
| 44 const WeakHandle<InvalidationStateTracker> | 50 WeakHandle<InvalidationStateTracker> invalidation_state_tracker_; |
| 45 invalidation_state_tracker_; | |
| 46 }; | 51 }; |
| 47 | 52 |
| 48 } // namespace syncer | 53 } // namespace syncer |
| 49 | 54 |
| 50 #endif // SYNC_NOTIFIER_INVALIDATOR_FACTORY_H_ | 55 #endif // SYNC_NOTIFIER_INVALIDATOR_FACTORY_H_ |
| OLD | NEW |