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

Unified Diff: chrome/browser/sync_file_system/drive_file_sync_service.cc

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 | « chrome/browser/sync_file_system/drive_file_sync_service.h ('k') | no next file » | 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_service.cc
diff --git a/chrome/browser/sync_file_system/drive_file_sync_service.cc b/chrome/browser/sync_file_system/drive_file_sync_service.cc
index e0edc101ece985f4c1455178f2fed993ed1668c3..729876a29d262be8762930d6be3b5ae285463de4 100644
--- a/chrome/browser/sync_file_system/drive_file_sync_service.cc
+++ b/chrome/browser/sync_file_system/drive_file_sync_service.cc
@@ -540,6 +540,17 @@ void DriveFileSyncService::OnAuthenticated() {
}
}
+void DriveFileSyncService::OnNetworkConnected() {
+ DVLOG(1) << "OnNetworkConnected";
+ if (state_ == REMOTE_SERVICE_AUTHENTICATION_REQUIRED ||
+ state_ == REMOTE_SERVICE_TEMPORARY_UNAVAILABLE) {
+ state_ = REMOTE_SERVICE_OK;
+ FOR_EACH_OBSERVER(
+ Observer, observers_,
+ OnRemoteServiceStateUpdated(state_, "Network connected"));
+ }
+}
+
// Called by CreateForTesting.
DriveFileSyncService::DriveFileSyncService(
const FilePath& base_dir,
« no previous file with comments | « chrome/browser/sync_file_system/drive_file_sync_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698