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 5ad5996c43f8cdb9da9156ab5633a0091de7e207..fc3637b55681b849c8712e4a6e5a0e4a0ea37a17 100644 |
--- a/chrome/browser/chromeos/gdata/gdata_file_system.h |
+++ b/chrome/browser/chromeos/gdata/gdata_file_system.h |
@@ -17,7 +17,6 @@ |
#include "base/timer.h" |
#include "base/synchronization/lock.h" |
#include "base/threading/sequenced_worker_pool.h" |
-#include "chrome/browser/chromeos/gdata/find_entry_callback.h" |
#include "chrome/browser/chromeos/gdata/gdata_cache.h" |
#include "chrome/browser/chromeos/gdata/gdata_files.h" |
#include "chrome/browser/prefs/pref_change_registrar.h" |
@@ -114,6 +113,11 @@ typedef base::Callback<void(const std::string& resource_id)> |
typedef base::Callback<void(base::PlatformFileError error, |
int cache_state)> GetCacheStateCallback; |
+// Callback used to find a directory element for file system updates. |
+void ReadOnlyFindEntryCallback(GDataEntry** out, |
achuithb
2012/06/11 21:48:41
Is this only used in 2 places now? GDataFileSystem
hshi1
2012/06/11 22:42:21
Yes this is only called in GDataFileSystem::GetGDa
achuithb
2012/06/11 22:56:11
Both the functions in the unit test and GDataFileS
hshi1
2012/06/11 23:17:52
I see, thanks for the explanation! I've removed th
|
+ base::PlatformFileError error, |
+ GDataEntry* entry); |
+ |
// GData file system abstraction layer. |
// The interface is defined to make GDataFileSystem mockable. |
class GDataFileSystemInterface { |
@@ -183,13 +187,11 @@ class GDataFileSystemInterface { |
virtual void Authenticate(const AuthStatusCallback& callback) = 0; |
// Finds file info by using |resource_id|. This call does not initiate |
- // content refreshing and will invoke one of |callback| methods directly as |
- // it executes. |
+ // content refreshing. |
// |
- // Can be called from UI/IO thread. |callback| is run on the calling thread |
- // synchronously. |
- virtual void FindEntryByResourceIdSync(const std::string& resource_id, |
- const FindEntryCallback& callback) = 0; |
+ // Can be called from UI/IO thread. |callback| is run on the calling thread. |
achuithb
2012/06/11 21:48:41
This is not true, right? |callback| is run on the
hshi1
2012/06/11 22:42:21
Actually this IS true and |callback| is run on the
achuithb
2012/06/11 22:56:11
Ah, ok. Didn't realize that's what CreateRelayCall
|
+ virtual void FindEntryByResourceId(const std::string& resource_id, |
+ const FindEntryCallback& callback) = 0; |
// Initiates transfer of |remote_src_file_path| to |local_dest_file_path|. |
// |remote_src_file_path| is the virtual source path on the gdata file system. |
@@ -434,7 +436,7 @@ class GDataFileSystem : public GDataFileSystemInterface, |
virtual void StopUpdates() OVERRIDE; |
virtual void CheckForUpdates() OVERRIDE; |
virtual void Authenticate(const AuthStatusCallback& callback) OVERRIDE; |
- virtual void FindEntryByResourceIdSync( |
+ virtual void FindEntryByResourceId( |
const std::string& resource_id, |
const FindEntryCallback& callback) OVERRIDE; |
virtual void SearchAsync(const std::string& search_query, |
@@ -1459,6 +1461,8 @@ class GDataFileSystem : public GDataFileSystemInterface, |
void GetFileInfoByPathAsyncOnUIThread( |
const FilePath& file_path, |
const GetFileInfoCallback& callback); |
+ void FindEntryByResourceIdOnUIThread(const std::string& resource_id, |
+ const FindEntryCallback& callback); |
void ReadDirectoryByPathAsyncOnUIThread( |
const FilePath& file_path, |
const ReadDirectoryCallback& callback); |