Chromium Code Reviews| 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..de64d8e318115dcaff045b46d6ea3b692e0bf99d 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,10 @@ class GDataFileSystemInterface { |
| virtual void AddObserver(Observer* observer) = 0; |
| virtual void RemoveObserver(Observer* observer) = 0; |
| + // Adds and removes file watch. |
| + virtual void AddFileWatch(const FilePath& watch_path) = 0; |
| + virtual void RemoveFileWatch(const FilePath& watch_path) = 0; |
| + |
| // Enum defining origin of a cached file. |
| enum CachedFileOrigin { |
| CACHED_FILE_FROM_SERVER = 0, |
| @@ -400,6 +405,8 @@ class GDataFileSystem : public GDataFileSystemInterface, |
| virtual void Initialize() OVERRIDE; |
| virtual void AddObserver(Observer* observer) OVERRIDE; |
| virtual void RemoveObserver(Observer* observer) OVERRIDE; |
| + virtual void AddFileWatch(const FilePath& watch_path) OVERRIDE; |
|
zel
2012/05/03 03:41:07
Please add StartUpdates() and StopUpdates() method
hshi
2012/05/03 17:46:35
Done.
|
| + virtual void RemoveFileWatch(const FilePath& watch_path) OVERRIDE; |
| virtual void Authenticate(const AuthStatusCallback& callback) OVERRIDE; |
| virtual void FindEntryByResourceIdSync(const std::string& resource_id, |
| FindEntryDelegate* delegate) OVERRIDE; |
| @@ -1303,6 +1310,9 @@ class GDataFileSystem : public GDataFileSystemInterface, |
| bool to_mount, |
| const SetMountedStateCallback& callback); |
| + // Check for updates on the server. |
|
satorux1
2012/05/03 16:49:29
Check -> Checks per our style guide
hshi
2012/05/03 17:46:35
Done.
|
| + void CheckForUpdates(); |
| + |
| scoped_ptr<GDataRootDirectory> root_; |
| // This guards regular states. |
| @@ -1333,6 +1343,10 @@ class GDataFileSystem : public GDataFileSystemInterface, |
| int num_pending_tasks_; |
| base::Lock num_pending_tasks_lock_; |
| + // Number of active file watches. |
| + int num_file_watches_; |
| + base::RepeatingTimer<GDataFileSystem> file_watch_timer_; |
| + |
| // True if hosted documents should be hidden. |
| bool hide_hosted_docs_; |