Index: chrome/browser/chromeos/gdata/gdata_file_system.h |
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system.h b/chrome/browser/chromeos/gdata/gdata_file_system.h |
index c963adc4545962b8d62a31b362e30ad0933a11fc..e8552c5ca9b1958b7561528a0ae644eab1656ed1 100644 |
--- a/chrome/browser/chromeos/gdata/gdata_file_system.h |
+++ b/chrome/browser/chromeos/gdata/gdata_file_system.h |
@@ -18,6 +18,7 @@ |
#include "base/memory/weak_ptr.h" |
#include "base/message_loop.h" |
#include "base/platform_file.h" |
+#include "base/timer.h" |
#include "base/synchronization/lock.h" |
#include "base/threading/sequenced_worker_pool.h" |
#include "chrome/browser/chromeos/gdata/find_entry_delegate.h" |
@@ -175,6 +176,13 @@ class GDataFileSystemInterface { |
virtual void AddObserver(Observer* observer) = 0; |
virtual void RemoveObserver(Observer* observer) = 0; |
+ // Starts and stops periodic updates. |
+ virtual void StartUpdates() = 0; |
+ virtual void StopUpdates() = 0; |
+ |
+ // Checks for updates on the server. |
+ virtual void CheckForUpdates() = 0; |
+ |
// Enum defining origin of a cached file. |
enum CachedFileOrigin { |
CACHED_FILE_FROM_SERVER = 0, |
@@ -400,6 +408,9 @@ class GDataFileSystem : public GDataFileSystemInterface, |
virtual void Initialize() OVERRIDE; |
virtual void AddObserver(Observer* observer) OVERRIDE; |
virtual void RemoveObserver(Observer* observer) OVERRIDE; |
+ virtual void StartUpdates() OVERRIDE; |
+ virtual void StopUpdates() OVERRIDE; |
+ virtual void CheckForUpdates() OVERRIDE; |
virtual void Authenticate(const AuthStatusCallback& callback) OVERRIDE; |
virtual void FindEntryByResourceIdSync(const std::string& resource_id, |
FindEntryDelegate* delegate) OVERRIDE; |
@@ -1333,6 +1344,9 @@ class GDataFileSystem : public GDataFileSystemInterface, |
int num_pending_tasks_; |
base::Lock num_pending_tasks_lock_; |
+ // Periodic timer for checking updates. |
+ base::Timer update_timer_; |
+ |
// True if hosted documents should be hidden. |
bool hide_hosted_docs_; |