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

Side by Side Diff: chrome/browser/sync/glue/shared_change_processor_mock.h

Issue 9307079: [Sync] Fix thread-ordering-dependent NULL dereference in NewNonFrontendDTC (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to head Created 8 years, 10 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
1 // Copyright (c) 2011 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_SYNC_GLUE_SHARED_CHANGE_PROCESSOR_MOCK_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SHARED_CHANGE_PROCESSOR_MOCK_H_
6 #define CHROME_BROWSER_SYNC_GLUE_SHARED_CHANGE_PROCESSOR_MOCK_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_SHARED_CHANGE_PROCESSOR_MOCK_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/sync/api/sync_change.h" 9 #include "chrome/browser/sync/api/sync_change.h"
10 #include "chrome/browser/sync/glue/shared_change_processor.h" 10 #include "chrome/browser/sync/glue/shared_change_processor.h"
11 #include "chrome/browser/sync/internal_api/includes/unrecoverable_error_handler. h" 11 #include "chrome/browser/sync/internal_api/includes/unrecoverable_error_handler. h"
12 #include "testing/gmock/include/gmock/gmock.h" 12 #include "testing/gmock/include/gmock/gmock.h"
13 13
14 namespace browser_sync { 14 namespace browser_sync {
15 15
16 class SharedChangeProcessorMock : public SharedChangeProcessor { 16 class SharedChangeProcessorMock : public SharedChangeProcessor {
17 public: 17 public:
18 SharedChangeProcessorMock(); 18 SharedChangeProcessorMock();
19 19
20 MOCK_METHOD4(Connect, bool( 20 MOCK_METHOD4(Connect, bool(
21 ProfileSyncComponentsFactory* sync_factory, 21 ProfileSyncComponentsFactory*,
22 ProfileSyncService* sync_service, 22 ProfileSyncService*,
23 UnrecoverableErrorHandler* error_handler, 23 UnrecoverableErrorHandler*,
24 const base::WeakPtr<SyncableService>& local_service)); 24 const base::WeakPtr<SyncableService>&));
25 MOCK_METHOD0(Disconnect, bool()); 25 MOCK_METHOD0(Disconnect, bool());
26 MOCK_METHOD2(ProcessSyncChanges, 26 MOCK_METHOD2(ProcessSyncChanges,
27 SyncError(const tracked_objects::Location& from_here, 27 SyncError(const tracked_objects::Location&,
28 const SyncChangeList& change_list)); 28 const SyncChangeList&));
29 MOCK_METHOD2(GetSyncDataForType, 29 MOCK_METHOD2(GetSyncDataForType,
30 SyncError(syncable::ModelType type, 30 SyncError(syncable::ModelType,
31 SyncDataList* current_sync_data)); 31 SyncDataList*));
32 MOCK_METHOD2(SyncModelHasUserCreatedNodes, 32 MOCK_METHOD2(SyncModelHasUserCreatedNodes,
33 bool(syncable::ModelType type, 33 bool(syncable::ModelType,
34 bool* has_nodes)); 34 bool*));
35 MOCK_METHOD1(CryptoReadyIfNecessary, bool(syncable::ModelType type)); 35 MOCK_METHOD1(CryptoReadyIfNecessary, bool(syncable::ModelType));
36 MOCK_METHOD3(ActivateDataType,
37 void(ProfileSyncService*, syncable::ModelType,
38 browser_sync::ModelSafeGroup));
36 39
37 protected: 40 protected:
38 virtual ~SharedChangeProcessorMock(); 41 virtual ~SharedChangeProcessorMock();
39 MOCK_METHOD2(OnUnrecoverableError, void(const tracked_objects::Location&, 42 MOCK_METHOD2(OnUnrecoverableError, void(const tracked_objects::Location&,
40 const std::string&)); 43 const std::string&));
41 44
42 private: 45 private:
43 DISALLOW_COPY_AND_ASSIGN(SharedChangeProcessorMock); 46 DISALLOW_COPY_AND_ASSIGN(SharedChangeProcessorMock);
44 }; 47 };
45 48
46 } // namespace browser_sync 49 } // namespace browser_sync
47 50
48 #endif // CHROME_BROWSER_SYNC_GLUE_SHARED_CHANGE_PROCESSOR_MOCK_H_ 51 #endif // CHROME_BROWSER_SYNC_GLUE_SHARED_CHANGE_PROCESSOR_MOCK_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/shared_change_processor.cc ('k') | chrome/browser/sync/glue/shared_change_processor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698