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

Side by Side Diff: chrome/browser/sync_file_system/mock_remote_file_sync_service.h

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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) 2012 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_FILE_SYSTEM_MOCK_REMOTE_FILE_SYNC_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_MOCK_REMOTE_FILE_SYNC_SERVICE_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_MOCK_REMOTE_FILE_SYNC_SERVICE_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_MOCK_REMOTE_FILE_SYNC_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 virtual void DumpDatabase(const ListCallback& callback) OVERRIDE; 59 virtual void DumpDatabase(const ListCallback& callback) OVERRIDE;
60 60
61 void SetServiceState(RemoteServiceState state); 61 void SetServiceState(RemoteServiceState state);
62 62
63 // Send notifications to the observers. 63 // Send notifications to the observers.
64 // Can be used in the mock implementation. 64 // Can be used in the mock implementation.
65 void NotifyRemoteChangeQueueUpdated(int64 pending_changes); 65 void NotifyRemoteChangeQueueUpdated(int64 pending_changes);
66 void NotifyRemoteServiceStateUpdated( 66 void NotifyRemoteServiceStateUpdated(
67 RemoteServiceState state, 67 RemoteServiceState state,
68 const std::string& description); 68 const std::string& description);
69 void NotifyFileStatusChanged( 69 void NotifyFileStatusChanged(const storage::FileSystemURL& url,
70 const fileapi::FileSystemURL& url, 70 SyncFileStatus sync_status,
71 SyncFileStatus sync_status, 71 SyncAction action_taken,
72 SyncAction action_taken, 72 SyncDirection direction);
73 SyncDirection direction);
74 73
75 private: 74 private:
76 void AddServiceObserverStub(Observer* observer); 75 void AddServiceObserverStub(Observer* observer);
77 void AddFileStatusObserverStub(FileStatusObserver* observer); 76 void AddFileStatusObserverStub(FileStatusObserver* observer);
78 void RegisterOriginStub( 77 void RegisterOriginStub(
79 const GURL& origin, const SyncStatusCallback& callback); 78 const GURL& origin, const SyncStatusCallback& callback);
80 void DeleteOriginDirectoryStub( 79 void DeleteOriginDirectoryStub(
81 const GURL& origin, UninstallFlag flag, 80 const GURL& origin, UninstallFlag flag,
82 const SyncStatusCallback& callback); 81 const SyncStatusCallback& callback);
83 void ProcessRemoteChangeStub(const SyncFileCallback& callback); 82 void ProcessRemoteChangeStub(const SyncFileCallback& callback);
84 RemoteServiceState GetCurrentStateStub() const; 83 RemoteServiceState GetCurrentStateStub() const;
85 84
86 // For default implementation. 85 // For default implementation.
87 ::testing::NiceMock<MockLocalChangeProcessor> mock_local_change_processor_; 86 ::testing::NiceMock<MockLocalChangeProcessor> mock_local_change_processor_;
88 87
89 ObserverList<Observer> service_observers_; 88 ObserverList<Observer> service_observers_;
90 ObserverList<FileStatusObserver> file_status_observers_; 89 ObserverList<FileStatusObserver> file_status_observers_;
91 90
92 ConflictResolutionPolicy conflict_resolution_policy_; 91 ConflictResolutionPolicy conflict_resolution_policy_;
93 92
94 RemoteServiceState state_; 93 RemoteServiceState state_;
95 94
96 DISALLOW_COPY_AND_ASSIGN(MockRemoteFileSyncService); 95 DISALLOW_COPY_AND_ASSIGN(MockRemoteFileSyncService);
97 }; 96 };
98 97
99 } // namespace sync_file_system 98 } // namespace sync_file_system
100 99
101 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_MOCK_REMOTE_FILE_SYNC_SERVICE_H_ 100 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_MOCK_REMOTE_FILE_SYNC_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698