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_CONTEXT_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_LOCAL_FILE_SYNC_CONTEXT_H_ |
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_LOCAL_FILE_SYNC_CONTEXT_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_LOCAL_FILE_SYNC_CONTEXT_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 LocalFileSyncStatus* sync_status() const; | 199 LocalFileSyncStatus* sync_status() const; |
200 | 200 |
201 // For testing; override the duration to notify changes from the | 201 // For testing; override the duration to notify changes from the |
202 // default value. | 202 // default value. |
203 void set_mock_notify_changes_duration_in_sec(int duration) { | 203 void set_mock_notify_changes_duration_in_sec(int duration) { |
204 mock_notify_changes_duration_in_sec_ = duration; | 204 mock_notify_changes_duration_in_sec_ = duration; |
205 } | 205 } |
206 | 206 |
207 protected: | 207 protected: |
208 // LocalFileSyncStatus::Observer overrides. They are called on IO thread. | 208 // LocalFileSyncStatus::Observer overrides. They are called on IO thread. |
209 virtual void OnSyncEnabled(const storage::FileSystemURL& url) OVERRIDE; | 209 virtual void OnSyncEnabled(const storage::FileSystemURL& url) override; |
210 virtual void OnWriteEnabled(const storage::FileSystemURL& url) OVERRIDE; | 210 virtual void OnWriteEnabled(const storage::FileSystemURL& url) override; |
211 | 211 |
212 private: | 212 private: |
213 typedef base::Callback<void(base::File::Error result)> StatusCallback; | 213 typedef base::Callback<void(base::File::Error result)> StatusCallback; |
214 typedef std::deque<SyncStatusCallback> StatusCallbackQueue; | 214 typedef std::deque<SyncStatusCallback> StatusCallbackQueue; |
215 typedef std::deque<storage::FileSystemURL> FileSystemURLQueue; | 215 typedef std::deque<storage::FileSystemURL> FileSystemURLQueue; |
216 friend class base::RefCountedThreadSafe<LocalFileSyncContext>; | 216 friend class base::RefCountedThreadSafe<LocalFileSyncContext>; |
217 friend class CannedSyncableFileSystem; | 217 friend class CannedSyncableFileSystem; |
218 | 218 |
219 virtual ~LocalFileSyncContext(); | 219 virtual ~LocalFileSyncContext(); |
220 | 220 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 ObserverList<LocalOriginChangeObserver> origin_change_observers_; | 371 ObserverList<LocalOriginChangeObserver> origin_change_observers_; |
372 | 372 |
373 int mock_notify_changes_duration_in_sec_; | 373 int mock_notify_changes_duration_in_sec_; |
374 | 374 |
375 DISALLOW_COPY_AND_ASSIGN(LocalFileSyncContext); | 375 DISALLOW_COPY_AND_ASSIGN(LocalFileSyncContext); |
376 }; | 376 }; |
377 | 377 |
378 } // namespace sync_file_system | 378 } // namespace sync_file_system |
379 | 379 |
380 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_LOCAL_FILE_SYNC_CONTEXT_H_ | 380 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_LOCAL_FILE_SYNC_CONTEXT_H_ |
OLD | NEW |