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

Side by Side Diff: chrome/browser/chromeos/drive/file_system/remove_operation.cc

Issue 15060002: drive: Rename FileCache methods in a blocking pool centric manner (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove virtual Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/drive/file_system/remove_operation.h" 5 #include "chrome/browser/chromeos/drive/file_system/remove_operation.h"
6 6
7 #include "chrome/browser/chromeos/drive/drive.pb.h" 7 #include "chrome/browser/chromeos/drive/drive.pb.h"
8 #include "chrome/browser/chromeos/drive/file_cache.h" 8 #include "chrome/browser/chromeos/drive/file_cache.h"
9 #include "chrome/browser/chromeos/drive/file_system/operation_observer.h" 9 #include "chrome/browser/chromeos/drive/file_system/operation_observer.h"
10 #include "chrome/browser/chromeos/drive/file_system_util.h" 10 #include "chrome/browser/chromeos/drive/file_system_util.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 callback.Run(error); 88 callback.Run(error);
89 return; 89 return;
90 } 90 }
91 91
92 metadata_->RemoveEntryOnUIThread( 92 metadata_->RemoveEntryOnUIThread(
93 resource_id, 93 resource_id,
94 base::Bind(&RemoveOperation::NotifyDirectoryChanged, 94 base::Bind(&RemoveOperation::NotifyDirectoryChanged,
95 weak_ptr_factory_.GetWeakPtr(), 95 weak_ptr_factory_.GetWeakPtr(),
96 callback)); 96 callback));
97 97
98 cache_->Remove(resource_id, base::Bind(&EmptyFileOperationCallback)); 98 cache_->RemoveOnUIThread(resource_id,
99 base::Bind(&EmptyFileOperationCallback));
99 } 100 }
100 101
101 void RemoveOperation::NotifyDirectoryChanged( 102 void RemoveOperation::NotifyDirectoryChanged(
102 const FileOperationCallback& callback, 103 const FileOperationCallback& callback,
103 FileError error, 104 FileError error,
104 const base::FilePath& directory_path) { 105 const base::FilePath& directory_path) {
105 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 106 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
106 DCHECK(!callback.is_null()); 107 DCHECK(!callback.is_null());
107 108
108 if (error == FILE_ERROR_OK) 109 if (error == FILE_ERROR_OK)
109 observer_->OnDirectoryChangedByOperation(directory_path); 110 observer_->OnDirectoryChangedByOperation(directory_path);
110 111
111 callback.Run(error); 112 callback.Run(error);
112 } 113 }
113 114
114 } // namespace file_system 115 } // namespace file_system
115 } // namespace drive 116 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698