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

Side by Side Diff: chrome/browser/chromeos/drive/drive_file_system.h

Issue 14348016: chromeos: Add DriveFileSystem::Pin/Unpin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use GetEntryInfoByPathSync Created 7 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_file_system.cc » ('j') | 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_DRIVE_FILE_SYSTEM_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 virtual void Remove(const base::FilePath& file_path, 99 virtual void Remove(const base::FilePath& file_path,
100 bool is_recursive, 100 bool is_recursive,
101 const FileOperationCallback& callback) OVERRIDE; 101 const FileOperationCallback& callback) OVERRIDE;
102 virtual void CreateDirectory(const base::FilePath& directory_path, 102 virtual void CreateDirectory(const base::FilePath& directory_path,
103 bool is_exclusive, 103 bool is_exclusive,
104 bool is_recursive, 104 bool is_recursive,
105 const FileOperationCallback& callback) OVERRIDE; 105 const FileOperationCallback& callback) OVERRIDE;
106 virtual void CreateFile(const base::FilePath& file_path, 106 virtual void CreateFile(const base::FilePath& file_path,
107 bool is_exclusive, 107 bool is_exclusive,
108 const FileOperationCallback& callback) OVERRIDE; 108 const FileOperationCallback& callback) OVERRIDE;
109 virtual void Pin(const base::FilePath& file_path,
110 const FileOperationCallback& callback) OVERRIDE;
111 virtual void Unpin(const base::FilePath& file_path,
112 const FileOperationCallback& callback) OVERRIDE;
109 virtual void GetFileByPath(const base::FilePath& file_path, 113 virtual void GetFileByPath(const base::FilePath& file_path,
110 const GetFileCallback& callback) OVERRIDE; 114 const GetFileCallback& callback) OVERRIDE;
111 virtual void GetFileByResourceId( 115 virtual void GetFileByResourceId(
112 const std::string& resource_id, 116 const std::string& resource_id,
113 const DriveClientContext& context, 117 const DriveClientContext& context,
114 const GetFileCallback& get_file_callback, 118 const GetFileCallback& get_file_callback,
115 const google_apis::GetContentCallback& get_content_callback) OVERRIDE; 119 const google_apis::GetContentCallback& get_content_callback) OVERRIDE;
116 virtual void GetFileContentByPath( 120 virtual void GetFileContentByPath(
117 const base::FilePath& file_path, 121 const base::FilePath& file_path,
118 const GetFileContentInitializedCallback& initialized_callback, 122 const GetFileContentInitializedCallback& initialized_callback,
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 // to OnGetEntryInfoForCreateFile. By using the information, CreateFile deals 207 // to OnGetEntryInfoForCreateFile. By using the information, CreateFile deals
204 // with the cases when an entry already existed at the path. If there was no 208 // with the cases when an entry already existed at the path. If there was no
205 // entry, a new empty file is uploaded, and when it finishes 209 // entry, a new empty file is uploaded, and when it finishes
206 // DidUploadForCreateBrandNewFile does the final clean up. 210 // DidUploadForCreateBrandNewFile does the final clean up.
207 // |callback| must not be null. 211 // |callback| must not be null.
208 void OnGetEntryInfoForCreateFile(const base::FilePath& file_path, 212 void OnGetEntryInfoForCreateFile(const base::FilePath& file_path,
209 bool is_exclusive, 213 bool is_exclusive,
210 const FileOperationCallback& callback, 214 const FileOperationCallback& callback,
211 DriveFileError result, 215 DriveFileError result,
212 scoped_ptr<DriveEntryProto> entry_proto); 216 scoped_ptr<DriveEntryProto> entry_proto);
213 void DoUploadForCreateBrandNewFile(const base::FilePath& remote_path, 217
214 base::FilePath* local_path, 218 // Used to implement Pin().
215 const FileOperationCallback& callback); 219 void PinAfterGetEntryInfoByPath(const FileOperationCallback& callback,
216 void DidUploadForCreateBrandNewFile(const base::FilePath& local_path, 220 DriveFileError error,
217 const FileOperationCallback& callback, 221 scoped_ptr<DriveEntryProto> entry);
218 DriveFileError result); 222
223 // Used to implement Unpin().
224 void UnpinAfterGetEntryInfoByPath(const FileOperationCallback& callback,
225 DriveFileError error,
226 scoped_ptr<DriveEntryProto> entry);
219 227
220 // Invoked upon completion of GetEntryInfoByPath initiated by 228 // Invoked upon completion of GetEntryInfoByPath initiated by
221 // GetFileByPath. It then continues to invoke GetResolvedFileByPath. 229 // GetFileByPath. It then continues to invoke GetResolvedFileByPath.
222 // |callback| must not be null. 230 // |callback| must not be null.
223 void OnGetEntryInfoCompleteForGetFileByPath( 231 void OnGetEntryInfoCompleteForGetFileByPath(
224 const base::FilePath& file_path, 232 const base::FilePath& file_path,
225 const GetFileCallback& callback, 233 const GetFileCallback& callback,
226 DriveFileError error, 234 DriveFileError error,
227 scoped_ptr<DriveEntryProto> file_info); 235 scoped_ptr<DriveEntryProto> file_info);
228 236
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 // Note: This should remain the last member so it'll be destroyed and 496 // Note: This should remain the last member so it'll be destroyed and
489 // invalidate the weak pointers before any other members are destroyed. 497 // invalidate the weak pointers before any other members are destroyed.
490 base::WeakPtrFactory<DriveFileSystem> weak_ptr_factory_; 498 base::WeakPtrFactory<DriveFileSystem> weak_ptr_factory_;
491 499
492 DISALLOW_COPY_AND_ASSIGN(DriveFileSystem); 500 DISALLOW_COPY_AND_ASSIGN(DriveFileSystem);
493 }; 501 };
494 502
495 } // namespace drive 503 } // namespace drive
496 504
497 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_ 505 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_file_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698