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

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

Issue 408003002: [Sync] Fix namespace for sync_driver component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 5 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 2013 The Chromium Authors. All rights reserved. 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 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_SYNC_BACKEND_HOST_MOCK_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_MOCK_H_
6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_MOCK_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_MOCK_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "chrome/browser/sync/glue/sync_backend_host.h" 12 #include "chrome/browser/sync/glue/sync_backend_host.h"
13 #include "sync/internal_api/public/util/weak_handle.h" 13 #include "sync/internal_api/public/util/weak_handle.h"
14 14
15 namespace browser_sync { 15 namespace browser_sync {
16 16
17 // A mock of the SyncBackendHost. 17 // A mock of the SyncBackendHost.
18 // 18 //
19 // This class implements the bare minimum required for the ProfileSyncService to 19 // This class implements the bare minimum required for the ProfileSyncService to
20 // get through initialization. It often returns NULL pointers or nonesense 20 // get through initialization. It often returns NULL pointers or nonesense
21 // values; it is not intended to be used in tests that depend on SyncBackendHost 21 // values; it is not intended to be used in tests that depend on SyncBackendHost
22 // behavior. 22 // behavior.
23 class SyncBackendHostMock : public SyncBackendHost { 23 class SyncBackendHostMock : public SyncBackendHost {
24 public: 24 public:
25 SyncBackendHostMock(); 25 SyncBackendHostMock();
26 virtual ~SyncBackendHostMock(); 26 virtual ~SyncBackendHostMock();
27 27
28 virtual void Initialize( 28 virtual void Initialize(
29 SyncFrontend* frontend, 29 sync_driver::SyncFrontend* frontend,
30 scoped_ptr<base::Thread> sync_thread, 30 scoped_ptr<base::Thread> sync_thread,
31 const syncer::WeakHandle<syncer::JsEventHandler>& event_handler, 31 const syncer::WeakHandle<syncer::JsEventHandler>& event_handler,
32 const GURL& service_url, 32 const GURL& service_url,
33 const syncer::SyncCredentials& credentials, 33 const syncer::SyncCredentials& credentials,
34 bool delete_sync_data_folder, 34 bool delete_sync_data_folder,
35 scoped_ptr<syncer::SyncManagerFactory> sync_manager_factory, 35 scoped_ptr<syncer::SyncManagerFactory> sync_manager_factory,
36 scoped_ptr<syncer::UnrecoverableErrorHandler> unrecoverable_error_handler, 36 scoped_ptr<syncer::UnrecoverableErrorHandler> unrecoverable_error_handler,
37 syncer::ReportUnrecoverableErrorFunction 37 syncer::ReportUnrecoverableErrorFunction
38 report_unrecoverable_error_function, 38 report_unrecoverable_error_function,
39 syncer::NetworkResources* network_resources) OVERRIDE; 39 syncer::NetworkResources* network_resources) OVERRIDE;
(...skipping 20 matching lines...) Expand all
60 syncer::ConfigureReason reason, 60 syncer::ConfigureReason reason,
61 const DataTypeConfigStateMap& config_state_map, 61 const DataTypeConfigStateMap& config_state_map,
62 const base::Callback<void(syncer::ModelTypeSet, 62 const base::Callback<void(syncer::ModelTypeSet,
63 syncer::ModelTypeSet)>& ready_task, 63 syncer::ModelTypeSet)>& ready_task,
64 const base::Callback<void()>& retry_callback) OVERRIDE; 64 const base::Callback<void()>& retry_callback) OVERRIDE;
65 65
66 virtual void EnableEncryptEverything() OVERRIDE; 66 virtual void EnableEncryptEverything() OVERRIDE;
67 67
68 virtual void ActivateDataType( 68 virtual void ActivateDataType(
69 syncer::ModelType type, syncer::ModelSafeGroup group, 69 syncer::ModelType type, syncer::ModelSafeGroup group,
70 ChangeProcessor* change_processor) OVERRIDE; 70 sync_driver::ChangeProcessor* change_processor) OVERRIDE;
71 virtual void DeactivateDataType(syncer::ModelType type) OVERRIDE; 71 virtual void DeactivateDataType(syncer::ModelType type) OVERRIDE;
72 72
73 virtual syncer::UserShare* GetUserShare() const OVERRIDE; 73 virtual syncer::UserShare* GetUserShare() const OVERRIDE;
74 74
75 virtual scoped_ptr<syncer::SyncContextProxy> GetSyncContextProxy() OVERRIDE; 75 virtual scoped_ptr<syncer::SyncContextProxy> GetSyncContextProxy() OVERRIDE;
76 76
77 virtual Status GetDetailedStatus() OVERRIDE; 77 virtual Status GetDetailedStatus() OVERRIDE;
78 78
79 virtual syncer::sessions::SyncSessionSnapshot 79 virtual syncer::sessions::SyncSessionSnapshot
80 GetLastSessionSnapshot() const OVERRIDE; 80 GetLastSessionSnapshot() const OVERRIDE;
(...skipping 29 matching lines...) Expand all
110 110
111 void set_fail_initial_download(bool should_fail); 111 void set_fail_initial_download(bool should_fail);
112 112
113 private: 113 private:
114 bool fail_initial_download_; 114 bool fail_initial_download_;
115 }; 115 };
116 116
117 } // namespace browser_sync 117 } // namespace browser_sync
118 118
119 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_MOCK_H_ 119 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_MOCK_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc ('k') | chrome/browser/sync/glue/sync_backend_host_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698