Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(411)

Unified Diff: chrome/browser/chromeos/drive/file_cache.cc

Issue 16628003: drive: Remove FileCacheObserver::OnCacheCommitted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/drive/file_cache.cc
diff --git a/chrome/browser/chromeos/drive/file_cache.cc b/chrome/browser/chromeos/drive/file_cache.cc
index 96d963c402d4b274c21fe23485492ce88ff542f8..53ac6d47a555fa0c69a6196fcdad13b86fad0a42 100644
--- a/chrome/browser/chromeos/drive/file_cache.cc
+++ b/chrome/browser/chromeos/drive/file_cache.cc
@@ -382,26 +382,6 @@ FileError FileCache::Store(const std::string& resource_id,
CACHED_FILE_FROM_SERVER);
}
-void FileCache::StoreLocallyModifiedOnUIThread(
- const std::string& resource_id,
- const std::string& md5,
- const base::FilePath& source_path,
- FileOperationType file_operation_type,
- const FileOperationCallback& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- DCHECK(!callback.is_null());
-
- base::PostTaskAndReplyWithResult(
- blocking_task_runner_,
- FROM_HERE,
- base::Bind(&FileCache::StoreInternal,
- base::Unretained(this),
- resource_id, md5, source_path, file_operation_type,
- CACHED_FILE_LOCALLY_MODIFIED),
kinaba 2013/06/11 07:08:37 Except this call StoreInternal is called always wi
hashimoto 2013/06/11 07:37:57 Done. I'll merge StoreInternal to Store in another
- base::Bind(&FileCache::OnCommitDirty,
- weak_ptr_factory_.GetWeakPtr(), resource_id, callback));
-}
-
void FileCache::PinOnUIThread(const std::string& resource_id,
const std::string& md5,
const FileOperationCallback& callback) {
@@ -627,21 +607,6 @@ FileError FileCache::MarkDirty(const std::string& resource_id,
return FILE_ERROR_OK;
}
-void FileCache::CommitDirtyOnUIThread(const std::string& resource_id,
- const std::string& md5,
- const FileOperationCallback& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- DCHECK(!callback.is_null());
-
- // TODO(hashimoto): Move logic around OnCommitDirty to FileSystem and remove
- // this method.
- base::MessageLoopProxy::current()->PostTask(
- FROM_HERE,
- base::Bind(&FileCache::OnCommitDirty,
- weak_ptr_factory_.GetWeakPtr(), resource_id, callback,
- FILE_ERROR_OK));
-}
-
FileError FileCache::ClearDirty(const std::string& resource_id,
const std::string& md5) {
AssertOnSequencedWorkerPool();
@@ -1044,20 +1009,6 @@ void FileCache::OnUnpinned(const std::string& resource_id,
base::Unretained(this), 0));
}
-void FileCache::OnCommitDirty(const std::string& resource_id,
- const FileOperationCallback& callback,
- FileError error) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- DCHECK(!callback.is_null());
-
- callback.Run(error);
-
- if (error == FILE_ERROR_OK)
- FOR_EACH_OBSERVER(FileCacheObserver,
- observers_,
- OnCacheCommitted(resource_id));
-}
-
bool FileCache::HasEnoughSpaceFor(int64 num_bytes,
const base::FilePath& path) {
int64 free_space = 0;

Powered by Google App Engine
This is Rietveld 408576698