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

Side by Side Diff: chrome/browser/invalidation/fake_invalidation_service.h

Issue 17911005: Merge 208347 "Revert 208315 "Make use of InvalidationService"" (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1547/src/
Patch Set: Created 7 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
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_INVALIDATION_FAKE_INVALIDATION_SERVICE_H_
6 #define CHROME_BROWSER_INVALIDATION_FAKE_INVALIDATION_SERVICE_H_
7
8 #include "chrome/browser/invalidation/invalidation_service.h"
9 #include "sync/notifier/invalidator_registrar.h"
10
11 namespace invalidation {
12
13 // An InvalidationService that emits invalidations only when
14 // its EmitInvalidationForTest method is called.
15 class FakeInvalidationService : public InvalidationService {
16 public:
17 FakeInvalidationService();
18 virtual ~FakeInvalidationService();
19
20 virtual void RegisterInvalidationHandler(
21 syncer::InvalidationHandler* handler) OVERRIDE;
22 virtual void UpdateRegisteredInvalidationIds(
23 syncer::InvalidationHandler* handler,
24 const syncer::ObjectIdSet& ids) OVERRIDE;
25 virtual void UnregisterInvalidationHandler(
26 syncer::InvalidationHandler* handler) OVERRIDE;
27
28 virtual void AcknowledgeInvalidation(
29 const invalidation::ObjectId& id,
30 const syncer::AckHandle& ack_handle) OVERRIDE;
31
32 virtual syncer::InvalidatorState GetInvalidatorState() const OVERRIDE;
33 virtual std::string GetInvalidatorClientId() const OVERRIDE;
34
35 void EmitInvalidationForTest(
36 const invalidation::ObjectId& object_id,
37 const std::string& payload);
38
39 private:
40 std::string client_id_;
41 syncer::InvalidatorRegistrar invalidator_registrar_;
42
43 DISALLOW_COPY_AND_ASSIGN(FakeInvalidationService);
44 };
45
46 } // namespace invalidation
47
48 #endif // CHROME_BROWSER_INVALIDATION_FAKE_INVALIDATION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698