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

Side by Side Diff: chrome/browser/sync/glue/sync_backend_host_mock.cc

Issue 6380004: [Sync] Tidy up SyncBackendHost interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows compile Created 9 years, 11 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) 2011 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 #include "chrome/browser/sync/glue/sync_backend_host_mock.h" 5 #include "chrome/browser/sync/glue/sync_backend_host_mock.h"
6 6
7 namespace browser_sync { 7 namespace browser_sync {
8 8
9 ACTION(InvokeTask) {
10 arg2->Run();
11 delete arg2;
12 }
13
9 SyncBackendHostMock::SyncBackendHostMock() { 14 SyncBackendHostMock::SyncBackendHostMock() {
10 // By default, the RequestPause and RequestResume methods will 15 // By default, the RequestPause and RequestResume methods will
11 // send the confirmation notification and return true. 16 // send the confirmation notification and return true.
12 ON_CALL(*this, RequestPause()). 17 ON_CALL(*this, RequestPause()).
13 WillByDefault(testing::DoAll(Notify(NotificationType::SYNC_PAUSED), 18 WillByDefault(testing::DoAll(Notify(NotificationType::SYNC_PAUSED),
14 testing::Return(true))); 19 testing::Return(true)));
15 ON_CALL(*this, RequestResume()). 20 ON_CALL(*this, RequestResume()).
16 WillByDefault(testing::DoAll(Notify(NotificationType::SYNC_RESUMED), 21 WillByDefault(testing::DoAll(Notify(NotificationType::SYNC_RESUMED),
17 testing::Return(true))); 22 testing::Return(true)));
18 23
19 // By default, invoke the ready callback. 24 // By default, invoke the ready callback.
20 ON_CALL(*this, ConfigureDataTypes(testing::_, testing::_)). 25 ON_CALL(*this, ConfigureDataTypes(testing::_, testing::_, testing::_)).
21 WillByDefault(InvokeTask()); 26 WillByDefault(InvokeTask());
22 } 27 }
23 28
24 SyncBackendHostMock::~SyncBackendHostMock() {} 29 SyncBackendHostMock::~SyncBackendHostMock() {}
25 30
26 } // namespace browser_sync 31 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698