summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/drive/drive_file_system_interface.h
diff options
context:
space:
mode:
authorhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-08 18:27:19 +0000
committerhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-08 18:27:19 +0000
commit70ddea6583ba681d79ddb294e705b1949a38b38a (patch)
tree60650bc6eaf32dc844e15df6916c9851742d7aa1 /chrome/browser/chromeos/drive/drive_file_system_interface.h
parent68b93518949e3751897dedf680b28718d7aebf2e (diff)
downloadchromium_src-70ddea6583ba681d79ddb294e705b1949a38b38a.zip
chromium_src-70ddea6583ba681d79ddb294e705b1949a38b38a.tar.gz
chromium_src-70ddea6583ba681d79ddb294e705b1949a38b38a.tar.bz2
chromeos: Stop allowing DriveFileSystem methods to be called on IO thread.
Eliminate all 'OnUIThread' from DriveFileSystem. Stop holding WeakPtr. Stop mentioning about threads in header, all operations are done on UI thread now. BUG=165619 TEST=unit_tests --gtest_filter="Drive*" Review URL: https://chromiumcodereview.appspot.com/12207074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181524 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/drive/drive_file_system_interface.h')
-rw-r--r--chrome/browser/chromeos/drive/drive_file_system_interface.h23
1 files changed, 1 insertions, 22 deletions
diff --git a/chrome/browser/chromeos/drive/drive_file_system_interface.h b/chrome/browser/chromeos/drive/drive_file_system_interface.h
index 2855e2a..df44133 100644
--- a/chrome/browser/chromeos/drive/drive_file_system_interface.h
+++ b/chrome/browser/chromeos/drive/drive_file_system_interface.h
@@ -112,7 +112,6 @@ class DriveFileSystemInterface {
// Finds an entry (file or directory) by using |resource_id|. This call
// does not initiate content refreshing.
//
- // Can be called from UI/IO thread. |callback| is run on the calling thread.
// |callback| must not be null.
virtual void GetEntryInfoByResourceId(
const std::string& resource_id,
@@ -122,7 +121,6 @@ class DriveFileSystemInterface {
// |remote_src_file_path| is the virtual source path on the Drive file system.
// |local_dest_file_path| is the destination path on the local file system.
//
- // Must be called from *UI* thread. |callback| is run on the calling thread.
// |callback| must not be null.
virtual void TransferFileFromRemoteToLocal(
const FilePath& remote_src_file_path,
@@ -134,7 +132,6 @@ class DriveFileSystemInterface {
// |remote_dest_file_path| is the virtual destination path within Drive file
// system.
//
- // Must be called from *UI* thread. |callback| is run on the calling thread.
// |callback| must not be null.
virtual void TransferFileFromLocalToRemote(
const FilePath& local_src_file_path,
@@ -149,7 +146,6 @@ class DriveFileSystemInterface {
// |CloseFile| must be called when the modification to the cache is done.
// Otherwise, Drive file system does not pick up the file for uploading.
//
- // Can be called from UI/IO thread. |callback| is run on the calling thread.
// |callback| must not be null.
virtual void OpenFile(const FilePath& file_path,
const OpenFileCallback& callback) = 0;
@@ -157,7 +153,6 @@ class DriveFileSystemInterface {
// Closes a file at the virtual path |file_path| on the Drive file system,
// which is opened via OpenFile(). It commits the dirty flag on the cache.
//
- // Can be called from UI/IO thread. |callback| is run on the calling thread.
// |callback| must not be null.
virtual void CloseFile(const FilePath& file_path,
const FileOperationCallback& callback) = 0;
@@ -179,7 +174,6 @@ class DriveFileSystemInterface {
// of |dest_file_path| need to be present in the in-memory representation
// of the file system.
//
- // Can be called from UI/IO thread. |callback| is run on the calling thread.
// |callback| must not be null.
virtual void Copy(const FilePath& src_file_path,
const FilePath& dest_file_path,
@@ -200,7 +194,6 @@ class DriveFileSystemInterface {
// of |dest_file_path| need to be present in the in-memory representation
// of the file system.
//
- // Can be called from UI/IO thread. |callback| is run on the calling thread.
// |callback| must not be null.
virtual void Move(const FilePath& src_file_path,
const FilePath& dest_file_path,
@@ -214,7 +207,6 @@ class DriveFileSystemInterface {
//
// TODO(satorux): is_recursive is not supported yet. crbug.com/138282
//
- // Can be called from UI/IO thread. |callback| is run on the calling thread.
// |callback| must not be null.
virtual void Remove(const FilePath& file_path,
bool is_recursive,
@@ -225,7 +217,6 @@ class DriveFileSystemInterface {
// |directory_path|. If |is_recursive| is true, the call creates parent
// directories as needed just like mkdir -p does.
//
- // Can be called from UI/IO thread. |callback| is run on the calling thread.
// |callback| must not be null.
virtual void CreateDirectory(const FilePath& directory_path,
bool is_exclusive,
@@ -237,7 +228,6 @@ class DriveFileSystemInterface {
// an error if a directory or a hosted document is already present at the
// path, or the parent directory of the path is not present yet.
//
- // Can be called from UI/IO thread. |callback| is run on the calling thread
// |callback| must not be null.
virtual void CreateFile(const FilePath& file_path,
bool is_exclusive,
@@ -248,8 +238,6 @@ class DriveFileSystemInterface {
// system in order to be retrieved. If the file is not cached, the file
// will be downloaded through GData API or Drive V2 API.
//
- // Can be called from UI/IO thread.
- // |callback| is run on the calling thread.
// |callback| must not be null.
virtual void GetFileByPath(const FilePath& file_path,
const GetFileCallback& callback) = 0;
@@ -257,8 +245,6 @@ class DriveFileSystemInterface {
// Gets a file by the given |resource_id| from the Drive server. Used for
// fetching pinned-but-not-fetched files.
//
- // Can be called from UI/IO thread. |get_file_callback| and
- // |get_content_callback| are run on the calling thread.
// |get_file_callback| must not be null.
// |get_content_callback| may be null.
virtual void GetFileByResourceId(
@@ -273,8 +259,7 @@ class DriveFileSystemInterface {
// TODO(satorux): As of now, the function only handles files with the dirty
// bit committed. We should eliminate the restriction. crbug.com/134558.
//
- // Can be called from UI/IO thread. |callback| and is run on the calling
- // thread. |callback| must not be null.
+ // |callback| must not be null.
virtual void UpdateFileByResourceId(
const std::string& resource_id,
const FileOperationCallback& callback) = 0;
@@ -282,7 +267,6 @@ class DriveFileSystemInterface {
// Finds an entry (a file or a directory) by |file_path|. This call will also
// retrieve and refresh file system content from server and disk cache.
//
- // Can be called from UI/IO thread. |callback| is run on the calling thread.
// |callback| must not be null.
virtual void GetEntryInfoByPath(const FilePath& file_path,
const GetEntryInfoCallback& callback) = 0;
@@ -290,7 +274,6 @@ class DriveFileSystemInterface {
// Finds and reads a directory by |file_path|. This call will also retrieve
// and refresh file system content from server and disk cache.
//
- // Can be called from UI/IO thread. |callback| is run on the calling thread.
// |callback| must not be null.
virtual void ReadDirectoryByPath(
const FilePath& file_path,
@@ -308,8 +291,6 @@ class DriveFileSystemInterface {
// and the change is notified via Observer::OnDirectoryChanged(). Note that
// this function ignores changes in directories in the target
// directory. Changes in directories are handled via the delta feeds.
- //
- // Can be called from UI/IO thread.
virtual void RequestDirectoryRefresh(const FilePath& file_path) = 0;
// Does server side content search for |search_query|.
@@ -319,7 +300,6 @@ class DriveFileSystemInterface {
// Search results will be returned as a list of results' |SearchResultInfo|
// structs, which contains file's path and is_directory flag.
//
- // Can be called from UI/IO thread. |callback| is run on the calling thread.
// |callback| must not be null.
virtual void Search(const std::string& search_query,
bool shared_with_me,
@@ -334,7 +314,6 @@ class DriveFileSystemInterface {
// the cache state. Adds a new file entry, and store its content from
// |file_content_path| into the cache.
//
- // |callback| will be called on the UI thread upon completion of operation.
// |callback| must not be null.
virtual void AddUploadedFile(const FilePath& directory_path,
scoped_ptr<google_apis::ResourceEntry> doc_entry,