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

Side by Side Diff: sync/test/mock_transaction_observer.h

Issue 10911073: NOT FOR COMMIT: Add DeviceInfo type and ChangeProcessor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Introduce SyncedDeviceTracker (the ChangeProcessor) Created 8 years, 3 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 (c) 2012 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 SYNC_TEST_MOCK_TRANSACTION_OBSERVER_H_
6 #define SYNC_TEST_MOCK_TRANSACTION_OBSERVER_H_
7
8 #include "base/memory/weak_ptr.h"
9 #include "sync/internal_api/public/base/model_type.h"
10 #include "sync/syncable/transaction_observer.h"
11 #include "sync/syncable/write_transaction_info.h"
12
13 namespace syncer {
14 namespace syncable {
15
16 class MockTransactionObserver :
Nicolas Zea 2012/09/13 00:45:55 comment about purpose of the class
rlarocque 2012/09/14 01:03:07 Done.
17 public base::SupportsWeakPtr<MockTransactionObserver>,
18 public TransactionObserver {
19 public:
20 MockTransactionObserver();
21 virtual void OnTransactionWrite(
22 const ImmutableWriteTransactionInfo& write_transaction_info,
23 ModelTypeSet models_with_changes) OVERRIDE;
24
25 int transactions_observed();
26
27 protected:
28 virtual ~MockTransactionObserver();
29
30 private:
31 DISALLOW_COPY_AND_ASSIGN(MockTransactionObserver);
32
33 base::WeakPtrFactory<MockTransactionObserver> weak_ptr_factory_;
Nicolas Zea 2012/09/13 00:45:55 weak ptr factory and SupportsWeakPtr?
rlarocque 2012/09/14 01:03:07 Whoops. Fixed.
34 int transactions_observed_;
35 };
36
37 } // namespace syncable
38 } // namespace syncer
39
40
41 #endif // SYNC_TEST_MOCK_TRANSACTION_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698