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

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

Issue 666133002: Standardize usage of virtual/override/final in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_INVALIDATION_FAKE_INVALIDATOR_H_ 5 #ifndef COMPONENTS_INVALIDATION_FAKE_INVALIDATOR_H_
6 #define COMPONENTS_INVALIDATION_FAKE_INVALIDATOR_H_ 6 #define COMPONENTS_INVALIDATION_FAKE_INVALIDATOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "components/invalidation/invalidation_util.h" 12 #include "components/invalidation/invalidation_util.h"
13 #include "components/invalidation/invalidator.h" 13 #include "components/invalidation/invalidator.h"
14 #include "components/invalidation/invalidator_registrar.h" 14 #include "components/invalidation/invalidator_registrar.h"
15 15
16 namespace syncer { 16 namespace syncer {
17 17
18 class FakeInvalidator : public Invalidator { 18 class FakeInvalidator : public Invalidator {
19 public: 19 public:
20 FakeInvalidator(); 20 FakeInvalidator();
21 virtual ~FakeInvalidator(); 21 ~FakeInvalidator() override;
22 22
23 bool IsHandlerRegistered(InvalidationHandler* handler) const; 23 bool IsHandlerRegistered(InvalidationHandler* handler) const;
24 ObjectIdSet GetRegisteredIds(InvalidationHandler* handler) const; 24 ObjectIdSet GetRegisteredIds(InvalidationHandler* handler) const;
25 const std::string& GetUniqueId() const; 25 const std::string& GetUniqueId() const;
26 const std::string& GetCredentialsEmail() const; 26 const std::string& GetCredentialsEmail() const;
27 const std::string& GetCredentialsToken() const; 27 const std::string& GetCredentialsToken() const;
28 28
29 void EmitOnInvalidatorStateChange(InvalidatorState state); 29 void EmitOnInvalidatorStateChange(InvalidatorState state);
30 void EmitOnIncomingInvalidation( 30 void EmitOnIncomingInvalidation(
31 const ObjectIdInvalidationMap& invalidation_map); 31 const ObjectIdInvalidationMap& invalidation_map);
32 32
33 virtual void RegisterHandler(InvalidationHandler* handler) override; 33 void RegisterHandler(InvalidationHandler* handler) override;
34 virtual void UpdateRegisteredIds(InvalidationHandler* handler, 34 void UpdateRegisteredIds(InvalidationHandler* handler,
35 const ObjectIdSet& ids) override; 35 const ObjectIdSet& ids) override;
36 virtual void UnregisterHandler(InvalidationHandler* handler) override; 36 void UnregisterHandler(InvalidationHandler* handler) override;
37 virtual InvalidatorState GetInvalidatorState() const override; 37 InvalidatorState GetInvalidatorState() const override;
38 virtual void UpdateCredentials( 38 void UpdateCredentials(const std::string& email,
39 const std::string& email, const std::string& token) override; 39 const std::string& token) override;
40 virtual void RequestDetailedStatus( 40 void RequestDetailedStatus(base::Callback<void(const base::DictionaryValue&)>
41 base::Callback<void(const base::DictionaryValue&)> callback) const 41 callback) const override;
42 override;
43 42
44 private: 43 private:
45 InvalidatorRegistrar registrar_; 44 InvalidatorRegistrar registrar_;
46 std::string state_; 45 std::string state_;
47 std::string email_; 46 std::string email_;
48 std::string token_; 47 std::string token_;
49 }; 48 };
50 49
51 } // namespace syncer 50 } // namespace syncer
52 51
53 #endif // COMPONENTS_INVALIDATION_FAKE_INVALIDATOR_H_ 52 #endif // COMPONENTS_INVALIDATION_FAKE_INVALIDATOR_H_
OLDNEW
« no previous file with comments | « components/invalidation/fake_invalidation_state_tracker.h ('k') | components/invalidation/gcm_invalidation_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698