OLD | NEW |
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_CHROMEOS_DRIVE_DRIVE_SYNC_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_SYNC_CLIENT_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_SYNC_CLIENT_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_SYNC_CLIENT_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "base/time.h" | 14 #include "base/time.h" |
15 #include "chrome/browser/chromeos/drive/drive_cache.h" | 15 #include "chrome/browser/chromeos/drive/drive_cache.h" |
16 #include "chrome/browser/chromeos/drive/drive_cache_observer.h" | 16 #include "chrome/browser/chromeos/drive/drive_cache_observer.h" |
17 #include "chrome/browser/chromeos/drive/drive_file_system_observer.h" | 17 #include "chrome/browser/chromeos/drive/drive_file_system_observer.h" |
18 #include "chrome/browser/chromeos/drive/drive_resource_metadata.h" | 18 #include "chrome/browser/chromeos/drive/drive_resource_metadata.h" |
19 #include "content/public/browser/notification_observer.h" | 19 #include "content/public/browser/notification_observer.h" |
20 #include "net/base/network_change_notifier.h" | 20 #include "net/base/network_change_notifier.h" |
21 | 21 |
22 class Profile; | 22 class Profile; |
23 class PrefChangeRegistrar; | 23 class PrefChangeRegistrar; |
24 | 24 |
25 namespace gdata { | 25 namespace drive { |
26 | 26 |
27 class DriveEntryProto; | 27 class DriveEntryProto; |
28 class DriveFileSystemInterface; | 28 class DriveFileSystemInterface; |
29 | 29 |
30 // The DriveSyncClient is used to synchronize pinned files on Drive and the | 30 // The DriveSyncClient is used to synchronize pinned files on Drive and the |
31 // cache on the local drive. The sync client works as follows. | 31 // cache on the local drive. The sync client works as follows. |
32 // | 32 // |
33 // When the user pins files on Drive, this client is notified about the files | 33 // When the user pins files on Drive, this client is notified about the files |
34 // that get pinned, and queues tasks and starts fetching these files in the | 34 // that get pinned, and queues tasks and starts fetching these files in the |
35 // background. | 35 // background. |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 // True if the sync loop is running. | 201 // True if the sync loop is running. |
202 bool sync_loop_is_running_; | 202 bool sync_loop_is_running_; |
203 | 203 |
204 // Note: This should remain the last member so it'll be destroyed and | 204 // Note: This should remain the last member so it'll be destroyed and |
205 // invalidate its weak pointers before any other members are destroyed. | 205 // invalidate its weak pointers before any other members are destroyed. |
206 base::WeakPtrFactory<DriveSyncClient> weak_ptr_factory_; | 206 base::WeakPtrFactory<DriveSyncClient> weak_ptr_factory_; |
207 | 207 |
208 DISALLOW_COPY_AND_ASSIGN(DriveSyncClient); | 208 DISALLOW_COPY_AND_ASSIGN(DriveSyncClient); |
209 }; | 209 }; |
210 | 210 |
211 } // namespace gdata | 211 } // namespace drive |
212 | 212 |
213 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_SYNC_CLIENT_H_ | 213 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_SYNC_CLIENT_H_ |
OLD | NEW |