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_GDATA_GDATA_SYNC_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYNC_CLIENT_H_ |
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYNC_CLIENT_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYNC_CLIENT_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 | 176 |
177 // chromeos::NetworkLibrary::NetworkManagerObserver override. | 177 // chromeos::NetworkLibrary::NetworkManagerObserver override. |
178 virtual void OnNetworkManagerChanged( | 178 virtual void OnNetworkManagerChanged( |
179 chromeos::NetworkLibrary* network_library) OVERRIDE; | 179 chromeos::NetworkLibrary* network_library) OVERRIDE; |
180 | 180 |
181 // content::NotificationObserver override. | 181 // content::NotificationObserver override. |
182 virtual void Observe(int type, | 182 virtual void Observe(int type, |
183 const content::NotificationSource& source, | 183 const content::NotificationSource& source, |
184 const content::NotificationDetails& details) OVERRIDE; | 184 const content::NotificationDetails& details) OVERRIDE; |
185 Profile* profile_; | 185 Profile* profile_; |
186 DriveFileSystemInterface* file_system_; // Owned by GDataSystemService. | 186 DriveFileSystemInterface* file_system_; // Owned by DriveSystemService. |
187 DriveCache* cache_; // Owned by GDataSystemService. | 187 DriveCache* cache_; // Owned by DriveSystemService. |
188 scoped_ptr<PrefChangeRegistrar> registrar_; | 188 scoped_ptr<PrefChangeRegistrar> registrar_; |
189 | 189 |
190 // The queue of tasks used to fetch/upload files in the background | 190 // The queue of tasks used to fetch/upload files in the background |
191 // thread. Note that this class does not use a lock to protect |queue_| as | 191 // thread. Note that this class does not use a lock to protect |queue_| as |
192 // all methods touching |queue_| run on the UI thread. | 192 // all methods touching |queue_| run on the UI thread. |
193 std::deque<SyncTask> queue_; | 193 std::deque<SyncTask> queue_; |
194 | 194 |
195 // The delay is used for delaying processing SyncTasks in DoSyncLoop(). | 195 // The delay is used for delaying processing SyncTasks in DoSyncLoop(). |
196 base::TimeDelta delay_; | 196 base::TimeDelta delay_; |
197 | 197 |
198 // True if the sync loop is running. | 198 // True if the sync loop is running. |
199 bool sync_loop_is_running_; | 199 bool sync_loop_is_running_; |
200 | 200 |
201 // Note: This should remain the last member so it'll be destroyed and | 201 // Note: This should remain the last member so it'll be destroyed and |
202 // invalidate its weak pointers before any other members are destroyed. | 202 // invalidate its weak pointers before any other members are destroyed. |
203 base::WeakPtrFactory<GDataSyncClient> weak_ptr_factory_; | 203 base::WeakPtrFactory<GDataSyncClient> weak_ptr_factory_; |
204 | 204 |
205 DISALLOW_COPY_AND_ASSIGN(GDataSyncClient); | 205 DISALLOW_COPY_AND_ASSIGN(GDataSyncClient); |
206 }; | 206 }; |
207 | 207 |
208 } // namespace gdata | 208 } // namespace gdata |
209 | 209 |
210 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYNC_CLIENT_H_ | 210 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYNC_CLIENT_H_ |
OLD | NEW |