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

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

Issue 18332014: Move Copy* into the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: windows Created 7 years, 5 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/task_runner_util.h" 10 #include "base/task_runner_util.h"
(...skipping 10 matching lines...) Expand all
21 #include "content/public/browser/browser_thread.h" 21 #include "content/public/browser/browser_thread.h"
22 22
23 using content::BrowserThread; 23 using content::BrowserThread;
24 24
25 namespace drive { 25 namespace drive {
26 namespace file_system { 26 namespace file_system {
27 27
28 namespace { 28 namespace {
29 29
30 // Copies a file from |src_file_path| to |dest_file_path| on the local 30 // Copies a file from |src_file_path| to |dest_file_path| on the local
31 // file system using file_util::CopyFile. 31 // file system using base::CopyFile.
32 // Returns FILE_ERROR_OK on success or FILE_ERROR_FAILED otherwise. 32 // Returns FILE_ERROR_OK on success or FILE_ERROR_FAILED otherwise.
33 FileError CopyLocalFileOnBlockingPool( 33 FileError CopyLocalFileOnBlockingPool(
34 const base::FilePath& src_file_path, 34 const base::FilePath& src_file_path,
35 const base::FilePath& dest_file_path) { 35 const base::FilePath& dest_file_path) {
36 return file_util::CopyFile(src_file_path, dest_file_path) ? 36 return base::CopyFile(src_file_path, dest_file_path) ?
37 FILE_ERROR_OK : FILE_ERROR_FAILED; 37 FILE_ERROR_OK : FILE_ERROR_FAILED;
38 } 38 }
39 39
40 // Stores a file to the cache and mark it dirty. 40 // Stores a file to the cache and mark it dirty.
41 FileError StoreAndMarkDirty(internal::FileCache* cache, 41 FileError StoreAndMarkDirty(internal::FileCache* cache,
42 const std::string& resource_id, 42 const std::string& resource_id,
43 const std::string& md5, 43 const std::string& md5,
44 const base::FilePath& local_file_path) { 44 const base::FilePath& local_file_path) {
45 FileError error = cache->Store(resource_id, md5, local_file_path, 45 FileError error = cache->Store(resource_id, md5, local_file_path,
46 internal::FileCache::FILE_OPERATION_COPY); 46 internal::FileCache::FILE_OPERATION_COPY);
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 canonicalized_resource_id, 475 canonicalized_resource_id,
476 // Drop the document extension, which should not be 476 // Drop the document extension, which should not be
477 // in the document title. 477 // in the document title.
478 // TODO(yoshiki): Remove this code with crbug.com/223304. 478 // TODO(yoshiki): Remove this code with crbug.com/223304.
479 remote_dest_file_path.BaseName().RemoveExtension().value(), 479 remote_dest_file_path.BaseName().RemoveExtension().value(),
480 callback); 480 callback);
481 } 481 }
482 482
483 } // namespace file_system 483 } // namespace file_system
484 } // namespace drive 484 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698