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

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

Issue 15728006: Implement TouchFile on drive::FileSystem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_DRIVE_OPERATIONS_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_DRIVE_OPERATIONS_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_DRIVE_OPERATIONS_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_DRIVE_OPERATIONS_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/chromeos/drive/file_system_interface.h" 9 #include "chrome/browser/chromeos/drive/file_system_interface.h"
10 10
11 namespace base { 11 namespace base {
12 class FilePath; 12 class FilePath;
13 class SequencedTaskRunner; 13 class SequencedTaskRunner;
14 class Time;
14 } // namespace base 15 } // namespace base
15 16
16 namespace drive { 17 namespace drive {
17 18
18 class JobScheduler; 19 class JobScheduler;
19 20
20 namespace internal { 21 namespace internal {
21 class FileCache; 22 class FileCache;
22 class ResourceMetadata; 23 class ResourceMetadata;
23 } // namespace internal 24 } // namespace internal
24 25
25 namespace file_system { 26 namespace file_system {
26 27
27 class CopyOperation; 28 class CopyOperation;
28 class CreateDirectoryOperation; 29 class CreateDirectoryOperation;
29 class CreateFileOperation; 30 class CreateFileOperation;
30 class MoveOperation; 31 class MoveOperation;
31 class OperationObserver; 32 class OperationObserver;
32 class RemoveOperation; 33 class RemoveOperation;
33 class SearchOperation; 34 class SearchOperation;
35 class TouchOperation;
34 class UpdateOperation; 36 class UpdateOperation;
35 37
36 // Callback for DriveOperations::Search. 38 // Callback for DriveOperations::Search.
37 // On success, |error| is FILE_ERROR_OK, and remaining arguments are valid to 39 // On success, |error| is FILE_ERROR_OK, and remaining arguments are valid to
38 // use. if |is_update_needed| is true, some mismatch is found between 40 // use. if |is_update_needed| is true, some mismatch is found between
39 // the result from the server and local metadata, so the caller should update 41 // the result from the server and local metadata, so the caller should update
40 // the resource metadata. 42 // the resource metadata.
41 // |next_feed| is the URL to fetch the remaining result from the server. Maybe 43 // |next_feed| is the URL to fetch the remaining result from the server. Maybe
42 // empty if there is no more results. 44 // empty if there is no more results.
43 // On error, |error| is set to other than FILE_ERROR_OK, and the caller 45 // On error, |error| is set to other than FILE_ERROR_OK, and the caller
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 void Move(const base::FilePath& src_file_path, 101 void Move(const base::FilePath& src_file_path,
100 const base::FilePath& dest_file_path, 102 const base::FilePath& dest_file_path,
101 const FileOperationCallback& callback); 103 const FileOperationCallback& callback);
102 104
103 // Wrapper function for remove_operation_. 105 // Wrapper function for remove_operation_.
104 // |callback| must not be null. 106 // |callback| must not be null.
105 void Remove(const base::FilePath& file_path, 107 void Remove(const base::FilePath& file_path,
106 bool is_recursive, 108 bool is_recursive,
107 const FileOperationCallback& callback); 109 const FileOperationCallback& callback);
108 110
111 // Wrapper function for touch_operation_.
112 // |callback| must not be null.
113 void TouchFile(const base::FilePath& file_path,
114 const base::Time& last_access_time,
115 const base::Time& last_modified_time,
116 const FileOperationCallback& callback);
117
109 // Wrapper function for update_operation_. 118 // Wrapper function for update_operation_.
110 // |callback| must not be null. 119 // |callback| must not be null.
111 void UpdateFileByResourceId(const std::string& resource_id, 120 void UpdateFileByResourceId(const std::string& resource_id,
112 DriveClientContext context, 121 DriveClientContext context,
113 const FileOperationCallback& callback); 122 const FileOperationCallback& callback);
114 123
115 // Wrapper function for search_operation_. 124 // Wrapper function for search_operation_.
116 // |callback| must not be null. 125 // |callback| must not be null.
117 void Search(const std::string& search_query, 126 void Search(const std::string& search_query,
118 const GURL& next_feed, 127 const GURL& next_feed,
119 const SearchOperationCallback& callback); 128 const SearchOperationCallback& callback);
120 129
121 private: 130 private:
122 scoped_ptr<CopyOperation> copy_operation_; 131 scoped_ptr<CopyOperation> copy_operation_;
123 scoped_ptr<CreateDirectoryOperation> create_directory_operation_; 132 scoped_ptr<CreateDirectoryOperation> create_directory_operation_;
124 scoped_ptr<CreateFileOperation> create_file_operation_; 133 scoped_ptr<CreateFileOperation> create_file_operation_;
125 scoped_ptr<MoveOperation> move_operation_; 134 scoped_ptr<MoveOperation> move_operation_;
126 scoped_ptr<RemoveOperation> remove_operation_; 135 scoped_ptr<RemoveOperation> remove_operation_;
136 scoped_ptr<TouchOperation> touch_operation_;
127 scoped_ptr<UpdateOperation> update_operation_; 137 scoped_ptr<UpdateOperation> update_operation_;
128 scoped_ptr<SearchOperation> search_operation_; 138 scoped_ptr<SearchOperation> search_operation_;
129 }; 139 };
130 140
131 } // namespace file_system 141 } // namespace file_system
132 } // namespace drive 142 } // namespace drive
133 143
134 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_DRIVE_OPERATIONS_H_ 144 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_DRIVE_OPERATIONS_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_system.cc ('k') | chrome/browser/chromeos/drive/file_system/drive_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698