Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Unified Diff: chrome/browser/sync_file_system/drive_file_sync_client.h

Issue 11419281: DriveFileSyncService listens to OnNetworkConnected event to restart synchronization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_file_sync_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync_file_system/drive_file_sync_client.h
diff --git a/chrome/browser/sync_file_system/drive_file_sync_client.h b/chrome/browser/sync_file_system/drive_file_sync_client.h
index f52fc705633842fa024ee5379afba4805fbc1866..02c40a54c772ea8542780e05d6de9dda4bbe07b6 100644
--- a/chrome/browser/sync_file_system/drive_file_sync_client.h
+++ b/chrome/browser/sync_file_system/drive_file_sync_client.h
@@ -17,6 +17,7 @@
#include "chrome/browser/google_apis/gdata_errorcode.h"
#include "chrome/browser/google_apis/gdata_wapi_parser.h"
#include "chrome/browser/google_apis/gdata_wapi_url_generator.h"
+#include "net/base/network_change_notifier.h"
class GURL;
class Profile;
@@ -32,6 +33,7 @@ class DriveFileSyncClientObserver {
DriveFileSyncClientObserver() {}
virtual ~DriveFileSyncClientObserver() {}
virtual void OnAuthenticated() = 0;
+ virtual void OnNetworkConnected() = 0;
private:
DISALLOW_COPY_AND_ASSIGN(DriveFileSyncClientObserver);
@@ -40,9 +42,11 @@ class DriveFileSyncClientObserver {
// This class is responsible for talking to the Drive service to get and put
// Drive directories, files and metadata.
// This class is owned by DriveFileSyncService.
-class DriveFileSyncClient : public google_apis::DriveServiceObserver,
- public base::NonThreadSafe,
- public base::SupportsWeakPtr<DriveFileSyncClient> {
+class DriveFileSyncClient
+ : public google_apis::DriveServiceObserver,
+ public net::NetworkChangeNotifier::ConnectionTypeObserver,
+ public base::NonThreadSafe,
+ public base::SupportsWeakPtr<DriveFileSyncClient> {
public:
typedef base::Callback<void(google_apis::GDataErrorCode error)>
GDataErrorCallback;
@@ -176,6 +180,10 @@ class DriveFileSyncClient : public google_apis::DriveServiceObserver,
// DriveServiceObserver overrides.
virtual void OnReadyToPerformOperations() OVERRIDE;
+ // ConnectionTypeObserver overrides.
+ virtual void OnConnectionTypeChanged(
+ net::NetworkChangeNotifier::ConnectionType type) OVERRIDE;
+
private:
friend class DriveFileSyncClientTest;
friend class DriveFileSyncServiceTest;
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_file_sync_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698