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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_file_system.h

Issue 10829277: GDataFileSystem is no longer a friend of GDataDirectory. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: change comment verb tenses Created 8 years, 4 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_GDATA_GDATA_FILE_SYSTEM_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 struct CreateDirectoryParams; 164 struct CreateDirectoryParams;
165 165
166 // Defines set of parameters passed to an intermediate callback 166 // Defines set of parameters passed to an intermediate callback
167 // OnGetFileCompleteForOpen, during execution of OpenFile() method. 167 // OnGetFileCompleteForOpen, during execution of OpenFile() method.
168 struct GetFileCompleteForOpenParams; 168 struct GetFileCompleteForOpenParams;
169 169
170 // Defines set of parameters passed to intermediate callbacks during 170 // Defines set of parameters passed to intermediate callbacks during
171 // execution of GetFileByPath() method. 171 // execution of GetFileByPath() method.
172 struct GetFileFromCacheParams; 172 struct GetFileFromCacheParams;
173 173
174
175 // Struct used for StartFileUploadOnUIThread(). 174 // Struct used for StartFileUploadOnUIThread().
176 struct StartFileUploadParams; 175 struct StartFileUploadParams;
177 176
177 // Struct used for AddUploadedFile.
178 struct AddUploadedFileParams;
179
178 // Callback passed to |LoadFeedFromServer| from |Search| method. 180 // Callback passed to |LoadFeedFromServer| from |Search| method.
179 // |callback| is that should be run with data received from 181 // |callback| is that should be run with data received from
180 // |LoadFeedFromServer|. 182 // |LoadFeedFromServer|.
181 // |params| params used for getting document feed for content search. 183 // |params| params used for getting document feed for content search.
182 // |error| error code returned by |LoadFeedFromServer|. 184 // |error| error code returned by |LoadFeedFromServer|.
183 void OnSearch(const SearchCallback& callback, 185 void OnSearch(const SearchCallback& callback,
184 GetDocumentsParams* params, 186 GetDocumentsParams* params,
185 GDataFileError error); 187 GDataFileError error);
186 188
187 // Part of TransferFileFromLocalToRemote(). Called after 189 // Part of TransferFileFromLocalToRemote(). Called after
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 const FilePath& moved_file_path); 524 const FilePath& moved_file_path);
523 525
524 // Callback for GDataDirectoryService::MoveEntryToDirectory with 526 // Callback for GDataDirectoryService::MoveEntryToDirectory with
525 // FileOperationCallback. 527 // FileOperationCallback.
526 // |callback| must not be null. 528 // |callback| must not be null.
527 void OnMoveEntryToDirectoryWithFileOperationCallback( 529 void OnMoveEntryToDirectoryWithFileOperationCallback(
528 const FileOperationCallback& callback, 530 const FileOperationCallback& callback,
529 GDataFileError error, 531 GDataFileError error,
530 const FilePath& moved_file_path); 532 const FilePath& moved_file_path);
531 533
534 // FileMoveCallback for directory changes.
535 void OnDirectoryChangeFileMoveCallback(
536 GDataFileError error,
537 const FilePath& directory_path);
538
532 // Callback for GetEntryByResourceIdAsync. 539 // Callback for GetEntryByResourceIdAsync.
533 // Removes stale entry upon upload of file. 540 // Removes stale entry upon upload of file.
534 static void RemoveStaleEntryOnUpload(const std::string& resource_id, 541 void RemoveStaleEntryOnUpload(const std::string& resource_id,
535 GDataDirectory* parent_dir, 542 GDataDirectory* parent_dir,
536 GDataEntry* existing_entry); 543 const FileMoveCallback& callback,
544 GDataEntry* existing_entry);
545
546 // Continues to add an uploaded file after existing entry has been deleted.
547 void ContinueAddUploadedFile(AddUploadedFileParams* params,
548 GDataFileError error,
549 const FilePath& file_path);
550
551 // Adds the uploaded file to the cache.
552 void AddUploadedFileToCache(AddUploadedFileParams* params,
553 GDataFileError error,
554 const FilePath& file_path);
537 555
538 // Converts |entry_value| into GFileDocument instance and adds it 556 // Converts |entry_value| into GFileDocument instance and adds it
539 // to virtual file system at |directory_path|. 557 // to virtual file system at |directory_path|.
540 GDataFileError AddNewDirectory(const FilePath& directory_path, 558 GDataFileError AddNewDirectory(const FilePath& directory_path,
541 base::Value* entry_value); 559 base::Value* entry_value);
542 560
543 // Given non-existing |directory_path|, finds the first missing parent 561 // Given non-existing |directory_path|, finds the first missing parent
544 // directory of |directory_path|. 562 // directory of |directory_path|.
545 FindMissingDirectoryResult FindFirstMissingParentDirectory( 563 FindMissingDirectoryResult FindFirstMissingParentDirectory(
546 const FilePath& directory_path, 564 const FilePath& directory_path,
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 void GetEntryInfoByResourceIdOnUIThread( 752 void GetEntryInfoByResourceIdOnUIThread(
735 const std::string& resource_id, 753 const std::string& resource_id,
736 const GetEntryInfoWithFilePathCallback& callback); 754 const GetEntryInfoWithFilePathCallback& callback);
737 void ReadDirectoryByPathAsyncOnUIThread( 755 void ReadDirectoryByPathAsyncOnUIThread(
738 const FilePath& file_path, 756 const FilePath& file_path,
739 const ReadDirectoryWithSettingCallback& callback); 757 const ReadDirectoryWithSettingCallback& callback);
740 void RequestDirectoryRefreshOnUIThread( 758 void RequestDirectoryRefreshOnUIThread(
741 const FilePath& file_path); 759 const FilePath& file_path);
742 void OnRequestDirectoryRefresh(GetDocumentsParams* params, 760 void OnRequestDirectoryRefresh(GetDocumentsParams* params,
743 GDataFileError error); 761 GDataFileError error);
744 void RequestDirectoryRefreshByEntry(
745 const FilePath& directory_path,
746 const std::string& directory_resource_id,
747 const FileResourceIdMap& file_map,
748 GDataEntry* directory_entry);
749 void GetAvailableSpaceOnUIThread(const GetAvailableSpaceCallback& callback); 762 void GetAvailableSpaceOnUIThread(const GetAvailableSpaceCallback& callback);
750 void AddUploadedFileOnUIThread(UploadMode upload_mode, 763 void AddUploadedFileOnUIThread(UploadMode upload_mode,
751 const FilePath& virtual_dir_path, 764 const FilePath& virtual_dir_path,
752 scoped_ptr<DocumentEntry> entry, 765 scoped_ptr<DocumentEntry> entry,
753 const FilePath& file_content_path, 766 const FilePath& file_content_path,
754 GDataCache::FileOperationType cache_operation, 767 GDataCache::FileOperationType cache_operation,
755 const base::Closure& callback); 768 const base::Closure& callback);
756 769
757 // Part of CopyOnUIThread(). Called after GetEntryInfoPairByPaths() is 770 // Part of CopyOnUIThread(). Called after GetEntryInfoPairByPaths() is
758 // complete. |callback| must not be null. 771 // complete. |callback| must not be null.
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 // invalidate the weak pointers before any other members are destroyed. 862 // invalidate the weak pointers before any other members are destroyed.
850 base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_; 863 base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_;
851 // Unlike other classes, we need this as we need this to redirect a task 864 // Unlike other classes, we need this as we need this to redirect a task
852 // from IO thread to UI thread. 865 // from IO thread to UI thread.
853 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; 866 base::WeakPtr<GDataFileSystem> ui_weak_ptr_;
854 }; 867 };
855 868
856 } // namespace gdata 869 } // namespace gdata
857 870
858 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ 871 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_file_system.cc » ('j') | chrome/browser/chromeos/gdata/gdata_file_system.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698