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

Side by Side Diff: chrome/browser/chromeos/drive/file_system/move_operation.h

Issue 11142036: Add Move operation to the the scheduler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 1 month 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
« no previous file with comments | « chrome/browser/chromeos/drive/drive_scheduler_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_MOVE_OPERATION_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_MOVE_OPERATION_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_MOVE_OPERATION_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_MOVE_OPERATION_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 23 matching lines...) Expand all
34 class MoveOperation { 34 class MoveOperation {
35 public: 35 public:
36 MoveOperation(google_apis::DriveServiceInterface* drive_service, 36 MoveOperation(google_apis::DriveServiceInterface* drive_service,
37 DriveResourceMetadata* metadata, 37 DriveResourceMetadata* metadata,
38 OperationObserver* observer); 38 OperationObserver* observer);
39 virtual ~MoveOperation(); 39 virtual ~MoveOperation();
40 40
41 // Performs the move operation on the file at drive path |src_file_path| 41 // Performs the move operation on the file at drive path |src_file_path|
42 // with a target of |dest_file_path|. Invokes |callback| when finished with 42 // with a target of |dest_file_path|. Invokes |callback| when finished with
43 // the result of the operation. 43 // the result of the operation.
44 void Move(const FilePath& src_file_path, 44 virtual void Move(const FilePath& src_file_path,
45 const FilePath& dest_file_path, 45 const FilePath& dest_file_path,
46 const FileOperationCallback& callback); 46 const FileOperationCallback& callback);
47 private: 47 private:
48 // Part of Move(). Called after GetEntryInfoPairByPaths() is 48 // Part of Move(). Called after GetEntryInfoPairByPaths() is
49 // complete. |callback| must not be null. 49 // complete. |callback| must not be null.
50 void MoveAfterGetEntryInfoPair( 50 void MoveAfterGetEntryInfoPair(
51 const FilePath& dest_file_path, 51 const FilePath& dest_file_path,
52 const FileOperationCallback& callback, 52 const FileOperationCallback& callback,
53 scoped_ptr<EntryInfoPairResult> result); 53 scoped_ptr<EntryInfoPairResult> result);
54 54
55 // A pass-through callback used for bridging from 55 // A pass-through callback used for bridging from
56 // FileMoveCallback to FileOperationCallback. 56 // FileMoveCallback to FileOperationCallback.
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // invalidate the weak pointers before any other members are destroyed. 154 // invalidate the weak pointers before any other members are destroyed.
155 base::WeakPtrFactory<MoveOperation> weak_ptr_factory_; 155 base::WeakPtrFactory<MoveOperation> weak_ptr_factory_;
156 156
157 DISALLOW_COPY_AND_ASSIGN(MoveOperation); 157 DISALLOW_COPY_AND_ASSIGN(MoveOperation);
158 }; 158 };
159 159
160 } // namespace file_system 160 } // namespace file_system
161 } // namespace drive 161 } // namespace drive
162 162
163 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_MOVE_OPERATION_H_ 163 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_MOVE_OPERATION_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/drive_scheduler_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698