summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorcalvinlo@chromium.org <calvinlo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-02 10:47:45 +0000
committercalvinlo@chromium.org <calvinlo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-02 10:47:45 +0000
commit17469e53bbc080a30b49509bd57fa9047cb8da71 (patch)
treebafc9a75eebaea9737fc5c31b15a540c762b35a7 /chrome/browser
parent8648b4d724a02093403670627d0e6042de3ed622 (diff)
downloadchromium_src-17469e53bbc080a30b49509bd57fa9047cb8da71.zip
chromium_src-17469e53bbc080a30b49509bd57fa9047cb8da71.tar.gz
chromium_src-17469e53bbc080a30b49509bd57fa9047cb8da71.tar.bz2
Add method to get publically get the current remote file sync service status.
BUG=226353 Review URL: https://chromiumcodereview.appspot.com/14841002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197886 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/sync_file_system/sync_file_system_service.cc4
-rw-r--r--chrome/browser/sync_file_system/sync_file_system_service.h3
2 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/sync_file_system/sync_file_system_service.cc b/chrome/browser/sync_file_system/sync_file_system_service.cc
index ba14e15..57f4d7c 100644
--- a/chrome/browser/sync_file_system/sync_file_system_service.cc
+++ b/chrome/browser/sync_file_system/sync_file_system_service.cc
@@ -126,6 +126,10 @@ void SyncFileSystemService::InitializeForApp(
AsWeakPtr(), app_origin, callback));
}
+SyncServiceState SyncFileSystemService::GetSyncServiceState() {
+ return RemoteStateToSyncServiceState(remote_file_service_->GetCurrentState());
+}
+
void SyncFileSystemService::GetFileSyncStatus(
const FileSystemURL& url, const SyncFileStatusCallback& callback) {
DCHECK(local_file_service_);
diff --git a/chrome/browser/sync_file_system/sync_file_system_service.h b/chrome/browser/sync_file_system/sync_file_system_service.h
index 99e3759..11fc6db 100644
--- a/chrome/browser/sync_file_system/sync_file_system_service.h
+++ b/chrome/browser/sync_file_system/sync_file_system_service.h
@@ -19,6 +19,7 @@
#include "chrome/browser/sync_file_system/file_status_observer.h"
#include "chrome/browser/sync_file_system/local_file_sync_service.h"
#include "chrome/browser/sync_file_system/remote_file_sync_service.h"
+#include "chrome/browser/sync_file_system/sync_service_state.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "googleurl/src/gurl.h"
@@ -52,6 +53,8 @@ class SyncFileSystemService
const GURL& app_origin,
const SyncStatusCallback& callback);
+ SyncServiceState GetSyncServiceState();
+
// Returns the file |url|'s sync status.
void GetFileSyncStatus(
const fileapi::FileSystemURL& url,