| OLD | NEW |
| 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_FILE_SYSTEM_LOCAL_LOCAL_FILE_SYNC_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_LOCAL_FILE_SYNC_SERVICE_H_ |
| 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_LOCAL_FILE_SYNC_SERVICE_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_LOCAL_FILE_SYNC_SERVICE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 124 |
| 125 void PromoteDemotedChanges(const base::Closure& callback); | 125 void PromoteDemotedChanges(const base::Closure& callback); |
| 126 | 126 |
| 127 // Returns the metadata of a remote file pointed by |url|. | 127 // Returns the metadata of a remote file pointed by |url|. |
| 128 virtual void GetLocalFileMetadata(const storage::FileSystemURL& url, | 128 virtual void GetLocalFileMetadata(const storage::FileSystemURL& url, |
| 129 const SyncFileMetadataCallback& callback); | 129 const SyncFileMetadataCallback& callback); |
| 130 | 130 |
| 131 // RemoteChangeProcessor overrides. | 131 // RemoteChangeProcessor overrides. |
| 132 virtual void PrepareForProcessRemoteChange( | 132 virtual void PrepareForProcessRemoteChange( |
| 133 const storage::FileSystemURL& url, | 133 const storage::FileSystemURL& url, |
| 134 const PrepareChangeCallback& callback) OVERRIDE; | 134 const PrepareChangeCallback& callback) override; |
| 135 virtual void ApplyRemoteChange(const FileChange& change, | 135 virtual void ApplyRemoteChange(const FileChange& change, |
| 136 const base::FilePath& local_path, | 136 const base::FilePath& local_path, |
| 137 const storage::FileSystemURL& url, | 137 const storage::FileSystemURL& url, |
| 138 const SyncStatusCallback& callback) OVERRIDE; | 138 const SyncStatusCallback& callback) override; |
| 139 virtual void FinalizeRemoteSync( | 139 virtual void FinalizeRemoteSync( |
| 140 const storage::FileSystemURL& url, | 140 const storage::FileSystemURL& url, |
| 141 bool clear_local_changes, | 141 bool clear_local_changes, |
| 142 const base::Closure& completion_callback) OVERRIDE; | 142 const base::Closure& completion_callback) override; |
| 143 virtual void RecordFakeLocalChange( | 143 virtual void RecordFakeLocalChange( |
| 144 const storage::FileSystemURL& url, | 144 const storage::FileSystemURL& url, |
| 145 const FileChange& change, | 145 const FileChange& change, |
| 146 const SyncStatusCallback& callback) OVERRIDE; | 146 const SyncStatusCallback& callback) override; |
| 147 | 147 |
| 148 // LocalOriginChangeObserver override. | 148 // LocalOriginChangeObserver override. |
| 149 virtual void OnChangesAvailableInOrigins( | 149 virtual void OnChangesAvailableInOrigins( |
| 150 const std::set<GURL>& origins) OVERRIDE; | 150 const std::set<GURL>& origins) override; |
| 151 | 151 |
| 152 // Called when a particular origin (app) is disabled/enabled while | 152 // Called when a particular origin (app) is disabled/enabled while |
| 153 // the service is running. This may be called for origins/apps that | 153 // the service is running. This may be called for origins/apps that |
| 154 // are not initialized for the service. | 154 // are not initialized for the service. |
| 155 void SetOriginEnabled(const GURL& origin, bool enabled); | 155 void SetOriginEnabled(const GURL& origin, bool enabled); |
| 156 | 156 |
| 157 private: | 157 private: |
| 158 typedef std::map<GURL, storage::FileSystemContext*> OriginToContext; | 158 typedef std::map<GURL, storage::FileSystemContext*> OriginToContext; |
| 159 friend class OriginChangeMapTest; | 159 friend class OriginChangeMapTest; |
| 160 | 160 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 GetLocalChangeProcessorCallback get_local_change_processor_; | 245 GetLocalChangeProcessorCallback get_local_change_processor_; |
| 246 | 246 |
| 247 ObserverList<Observer> change_observers_; | 247 ObserverList<Observer> change_observers_; |
| 248 | 248 |
| 249 DISALLOW_COPY_AND_ASSIGN(LocalFileSyncService); | 249 DISALLOW_COPY_AND_ASSIGN(LocalFileSyncService); |
| 250 }; | 250 }; |
| 251 | 251 |
| 252 } // namespace sync_file_system | 252 } // namespace sync_file_system |
| 253 | 253 |
| 254 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_LOCAL_FILE_SYNC_SERVICE_H_ | 254 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_LOCAL_FILE_SYNC_SERVICE_H_ |
| OLD | NEW |