drive: Remove FileCacheObserver::OnCacheCommitted
FileCacheObserver::CommitDirty does nothing but notifying cache observers about OnCacheComitted event whose only user is SyncClient.
We should abandon this complexity by simply calling SyncClient methods from FileSystem.
Remove FileCacheObserver::OnCacheCommitted
Remove FileCache::CommitDirtyOnUIThread and StoreLocallyModifiedOnUIThread
Rename SyncClient methods.
Call SyncClient methods from FileSystem directly.
Add OperationObserver::OnCacheFileUploadNeededByOperation to trigger upload from CopyOperation.
BUG=247274
TEST=unit_tests
Review URL: https://chromiumcodereview.appspot.com/16628003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205568 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/chromeos/drive/file_cache.h b/chrome/browser/chromeos/drive/file_cache.h
index 2c169a2..0c6d5e9 100644
--- a/chrome/browser/chromeos/drive/file_cache.h
+++ b/chrome/browser/chromeos/drive/file_cache.h
@@ -198,16 +198,6 @@
const base::FilePath& source_path,
FileOperationType file_operation_type);
- // Stores |source_path| to the cache and mark it as dirty, i.e., needs to be
- // uploaded to the remove server for syncing.
- // |callback| must not be null.
- // Must be called on the UI thread.
- void StoreLocallyModifiedOnUIThread(const std::string& resource_id,
- const std::string& md5,
- const base::FilePath& source_path,
- FileOperationType file_operation_type,
- const FileOperationCallback& callback);
-
// Runs Pin() on |blocking_task_runner_|, and calls |callback| with the result
// asynchronously.
// |callback| must not be null.
@@ -256,13 +246,6 @@
FileError MarkDirty(const std::string& resource_id,
const std::string& md5);
- // Commits changes for the specified dirty entry.
- // |callback| must not be null.
- // Must be called on the UI thread.
- void CommitDirtyOnUIThread(const std::string& resource_id,
- const std::string& md5,
- const FileOperationCallback& callback);
-
// Clears dirty state of the specified entry.
FileError ClearDirty(const std::string& resource_id,
const std::string& md5);
@@ -348,8 +331,7 @@
FileError StoreInternal(const std::string& resource_id,
const std::string& md5,
const base::FilePath& source_path,
- FileOperationType file_operation_type,
- CachedFileOrigin origin);
+ FileOperationType file_operation_type);
// Used to implement MarkAsMountedOnUIThread.
FileError MarkAsMounted(const std::string& resource_id,
@@ -373,11 +355,6 @@
const FileOperationCallback& callback,
FileError error);
- // Runs callback and notifies the observers when file is committed.
- void OnCommitDirty(const std::string& resource_id,
- const FileOperationCallback& callback,
- FileError error);
-
// Returns true if we have sufficient space to store the given number of
// bytes, while keeping kMinFreeSpace bytes on the disk.
bool HasEnoughSpaceFor(int64 num_bytes, const base::FilePath& path);