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

Side by Side Diff: chrome/browser/chromeos/drive/file_system/copy_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/copy_operation.h" 5 #include "chrome/browser/chromeos/drive/file_system/copy_operation.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/json/json_file_value_serializer.h" 10 #include "base/json/json_file_value_serializer.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 void CopyOperation::ScheduleTransferRegularFileAfterGetEntryInfo( 197 void CopyOperation::ScheduleTransferRegularFileAfterGetEntryInfo(
198 const base::FilePath& local_file_path, 198 const base::FilePath& local_file_path,
199 const FileOperationCallback& callback, 199 const FileOperationCallback& callback,
200 FileError error, 200 FileError error,
201 scoped_ptr<ResourceEntry> entry) { 201 scoped_ptr<ResourceEntry> entry) {
202 if (error != FILE_ERROR_OK) { 202 if (error != FILE_ERROR_OK) {
203 callback.Run(error); 203 callback.Run(error);
204 return; 204 return;
205 } 205 }
206 206
207 cache_->StoreLocallyModified(entry->resource_id(), 207 cache_->StoreLocallyModifiedOnUIThread(
208 entry->file_specific_info().file_md5(), 208 entry->resource_id(),
209 local_file_path, 209 entry->file_specific_info().file_md5(),
210 internal::FileCache::FILE_OPERATION_COPY, 210 local_file_path,
211 callback); 211 internal::FileCache::FILE_OPERATION_COPY,
212 callback);
212 } 213 }
213 214
214 void CopyOperation::CopyHostedDocumentToDirectory( 215 void CopyOperation::CopyHostedDocumentToDirectory(
215 const base::FilePath& dir_path, 216 const base::FilePath& dir_path,
216 const std::string& resource_id, 217 const std::string& resource_id,
217 const base::FilePath::StringType& new_name, 218 const base::FilePath::StringType& new_name,
218 const FileOperationCallback& callback) { 219 const FileOperationCallback& callback) {
219 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 220 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
220 DCHECK(!callback.is_null()); 221 DCHECK(!callback.is_null());
221 222
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 remote_dest_file_path.DirName(), 399 remote_dest_file_path.DirName(),
399 resource_id, 400 resource_id,
400 // Drop the document extension, which should not be 401 // Drop the document extension, which should not be
401 // in the document title. 402 // in the document title.
402 remote_dest_file_path.BaseName().RemoveExtension().value(), 403 remote_dest_file_path.BaseName().RemoveExtension().value(),
403 callback); 404 callback);
404 } 405 }
405 406
406 } // namespace file_system 407 } // namespace file_system
407 } // namespace drive 408 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_system.cc ('k') | chrome/browser/chromeos/drive/file_system/remove_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698