blob: dea5482cdbdd9cbe61293877c18f3e7c177dbdb0 [file] [log] [blame]
[email protected]4aea04a2010-02-10 20:13:431// Copyright (c) 2010 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_SYNC_PROFILE_SYNC_SERVICE_MOCK_H_
6#define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_MOCK_H_
[email protected]32b76ef2010-07-26 23:08:247#pragma once
[email protected]4aea04a2010-02-10 20:13:438
9#include <string>
10#include "base/string16.h"
11#include "chrome/browser/profile.h"
12#include "chrome/browser/sync/glue/change_processor.h"
13#include "chrome/browser/sync/glue/data_type_controller.h"
14#include "chrome/browser/sync/profile_sync_service.h"
[email protected]e78d74e2010-04-06 22:49:4715#include "chrome/browser/sync/syncable/model_type.h"
[email protected]4aea04a2010-02-10 20:13:4316#include "testing/gmock/include/gmock/gmock.h"
17
18class ProfileSyncServiceMock : public ProfileSyncService {
19 public:
[email protected]82d9d2952010-05-15 00:36:1620 ProfileSyncServiceMock() {}
[email protected]4aea04a2010-02-10 20:13:4321 virtual ~ProfileSyncServiceMock() {}
22
[email protected]4aea04a2010-02-10 20:13:4323 MOCK_METHOD0(DisableForUser, void());
24 MOCK_METHOD0(OnBackendInitialized, void());
25 MOCK_METHOD0(OnSyncCycleCompleted, void());
26 MOCK_METHOD0(OnAuthError, void());
27 MOCK_METHOD3(OnUserSubmittedAuth,
28 void(const std::string& username,
29 const std::string& password,
30 const std::string& captcha));
[email protected]4aea04a2010-02-10 20:13:4331 MOCK_METHOD0(OnUserCancelledDialog, void());
32 MOCK_CONST_METHOD0(GetAuthenticatedUsername, string16());
[email protected]f6ec8b22010-06-08 23:40:0633 MOCK_METHOD2(OnUnrecoverableError,
34 void(const tracked_objects::Location& location,
35 const std::string& message));
[email protected]4aea04a2010-02-10 20:13:4336 MOCK_METHOD2(ActivateDataType,
37 void(browser_sync::DataTypeController* data_type_controller,
38 browser_sync::ChangeProcessor* change_processor));
39 MOCK_METHOD2(DeactivateDataType,
40 void(browser_sync::DataTypeController* data_type_controller,
41 browser_sync::ChangeProcessor* change_processor));
42
43 MOCK_METHOD0(InitializeBackend, void());
[email protected]4772b072010-03-30 17:45:4644 MOCK_METHOD1(AddObserver, void(Observer*));
45 MOCK_METHOD1(RemoveObserver, void(Observer*));
46 MOCK_CONST_METHOD0(HasSyncSetupCompleted, bool());
[email protected]e78d74e2010-04-06 22:49:4747
48 MOCK_METHOD1(ChangePreferredDataTypes,
49 void(const syncable::ModelTypeSet& preferred_types));
50 MOCK_CONST_METHOD1(GetPreferredDataTypes,
51 void(syncable::ModelTypeSet* preferred_types));
52 MOCK_CONST_METHOD1(GetRegisteredDataTypes,
53 void(syncable::ModelTypeSet* registered_types));
[email protected]f1e6e0212010-10-15 20:54:2454
55 MOCK_METHOD0(QueryDetailedSyncStatus,
56 browser_sync::SyncBackendHost::Status());
57 MOCK_CONST_METHOD0(GetLastSyncedTimeString, string16());
58 MOCK_CONST_METHOD0(unrecoverable_error_detected, bool());
[email protected]4aea04a2010-02-10 20:13:4359};
60
61#endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_MOCK_H_