| Index: chrome/browser/chromeos/drive/drive_sync_client.h
|
| diff --git a/chrome/browser/chromeos/drive/drive_sync_client.h b/chrome/browser/chromeos/drive/drive_sync_client.h
|
| index aae1be33aa0dad1c30d533731091f69b8d185c42..d7be8efc35c8a2299aa99289aa87eb256ba47a7c 100644
|
| --- a/chrome/browser/chromeos/drive/drive_sync_client.h
|
| +++ b/chrome/browser/chromeos/drive/drive_sync_client.h
|
| @@ -44,7 +44,7 @@ class DriveSyncClientObserver;
|
| class DriveSyncClient
|
| : public DriveFileSystemObserver,
|
| public DriveCacheObserver,
|
| - public net::NetworkChangeNotifier::ConnectionTypeObserver {
|
| + public net::NetworkChangeNotifier::NetworkChangeObserver {
|
| public:
|
| // Types of sync tasks.
|
| enum SyncType {
|
| @@ -114,8 +114,9 @@ class DriveSyncClient
|
| delay_ = delay;
|
| }
|
|
|
| - // Starts the sync loop if it's not running.
|
| - void StartSyncLoop();
|
| + // Starts the sync loop if it's not running. |force_offline| implies there
|
| + // is no usable network connection.
|
| + void StartSyncLoop(bool force_offline);
|
|
|
| private:
|
| friend class DriveSyncClientTest;
|
| @@ -126,11 +127,13 @@ class DriveSyncClient
|
|
|
| // Runs the sync loop that fetches/uploads files in |queue_|. One file is
|
| // fetched/uploaded at a time, rather than in parallel. The loop ends when
|
| - // the queue becomes empty.
|
| - void DoSyncLoop();
|
| + // the queue becomes empty. |force_offline| implies there is no usable network
|
| + // connection.
|
| + void DoSyncLoop(bool force_offline);
|
|
|
| - // Returns true if we should stop the sync loop.
|
| - bool ShouldStopSyncLoop();
|
| + // Returns true if we should stop the sync loop. |force_offline| implies there
|
| + // is no usable network connection.
|
| + bool ShouldStopSyncLoop(bool force_offline);
|
|
|
| // Called when the resource IDs of files in the backlog are obtained.
|
| void OnGetResourceIdsOfBacklog(const std::vector<std::string>* to_fetch,
|
| @@ -175,8 +178,8 @@ class DriveSyncClient
|
| // Called on prefs changes.
|
| void OnDriveSyncPreferenceChanged();
|
|
|
| - // net::NetworkChangeNotifier::ConnectionTypeObserver override.
|
| - virtual void OnConnectionTypeChanged(
|
| + // net::NetworkChangeNotifier::NetworkChangeObserver override.
|
| + virtual void OnNetworkChanged(
|
| net::NetworkChangeNotifier::ConnectionType type) OVERRIDE;
|
|
|
| Profile* profile_;
|
|
|