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

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

Issue 10919093: Rename GDataUplaoder to DriveUploader (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix after rebase Created 8 years, 3 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_DRIVE_FILE_SYSTEM_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_H_
6 #define CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_H_ 6 #define CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 14 matching lines...) Expand all
25 #include "content/public/browser/notification_observer.h" 25 #include "content/public/browser/notification_observer.h"
26 26
27 namespace base { 27 namespace base {
28 class SequencedTaskRunner; 28 class SequencedTaskRunner;
29 } 29 }
30 30
31 namespace gdata { 31 namespace gdata {
32 32
33 class DriveFunctionRemove; 33 class DriveFunctionRemove;
34 class DriveServiceInterface; 34 class DriveServiceInterface;
35 class DriveUploaderInterface;
35 class DriveWebAppsRegistryInterface; 36 class DriveWebAppsRegistryInterface;
36 class GDataUploaderInterface;
37 class GDataWapiFeedLoader; 37 class GDataWapiFeedLoader;
38 struct UploadFileInfo; 38 struct UploadFileInfo;
39 39
40 // The production implementation of DriveFileSystemInterface. 40 // The production implementation of DriveFileSystemInterface.
41 class DriveFileSystem : public DriveFileSystemInterface, 41 class DriveFileSystem : public DriveFileSystemInterface,
42 public GDataWapiFeedLoader::Observer, 42 public GDataWapiFeedLoader::Observer,
43 public content::NotificationObserver { 43 public content::NotificationObserver {
44 public: 44 public:
45 DriveFileSystem(Profile* profile, 45 DriveFileSystem(Profile* profile,
46 DriveCache* cache, 46 DriveCache* cache,
47 DriveServiceInterface* drive_service, 47 DriveServiceInterface* drive_service,
48 GDataUploaderInterface* uploader, 48 DriveUploaderInterface* uploader,
49 DriveWebAppsRegistryInterface* webapps_registry, 49 DriveWebAppsRegistryInterface* webapps_registry,
50 base::SequencedTaskRunner* blocking_task_runner); 50 base::SequencedTaskRunner* blocking_task_runner);
51 virtual ~DriveFileSystem(); 51 virtual ~DriveFileSystem();
52 52
53 // DriveFileSystem overrides. 53 // DriveFileSystem overrides.
54 virtual void Initialize() OVERRIDE; 54 virtual void Initialize() OVERRIDE;
55 virtual void AddObserver( 55 virtual void AddObserver(
56 DriveFileSystemInterface::Observer* observer) OVERRIDE; 56 DriveFileSystemInterface::Observer* observer) OVERRIDE;
57 virtual void RemoveObserver( 57 virtual void RemoveObserver(
58 DriveFileSystemInterface::Observer* observer) OVERRIDE; 58 DriveFileSystemInterface::Observer* observer) OVERRIDE;
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 // Part of UpdateFileByResourceId(). 739 // Part of UpdateFileByResourceId().
740 // Callback for getting the size of the cache file in the blocking pool. 740 // Callback for getting the size of the cache file in the blocking pool.
741 // |callback| must not be null. 741 // |callback| must not be null.
742 void OnGetFileSizeCompleteForUpdateFile(const FileOperationCallback& callback, 742 void OnGetFileSizeCompleteForUpdateFile(const FileOperationCallback& callback,
743 const std::string& resource_id, 743 const std::string& resource_id,
744 const FilePath& cache_file_path, 744 const FilePath& cache_file_path,
745 DriveFileError* error, 745 DriveFileError* error,
746 int64* file_size); 746 int64* file_size);
747 747
748 // Part of UpdateFileByResourceId(). 748 // Part of UpdateFileByResourceId().
749 // Callback for GDataRootDirectory::GetEntryInfoByResourceId. 749 // Callback for DriveRootDirectory::GetEntryInfoByResourceId.
750 // |callback| must not be null. 750 // |callback| must not be null.
751 void OnGetFileCompleteForUpdateFileByEntry( 751 void OnGetFileCompleteForUpdateFileByEntry(
752 const FileOperationCallback& callback, 752 const FileOperationCallback& callback,
753 int64 file_size, 753 int64 file_size,
754 const FilePath& cache_file_path, 754 const FilePath& cache_file_path,
755 DriveFileError error, 755 DriveFileError error,
756 const FilePath& drive_file_path, 756 const FilePath& drive_file_path,
757 scoped_ptr<DriveEntryProto> entry_proto); 757 scoped_ptr<DriveEntryProto> entry_proto);
758 758
759 // Part of UpdateFileByResourceId(). 759 // Part of UpdateFileByResourceId().
760 // Called when GDataUploader::UploadUpdatedFile() is completed for 760 // Called when DriveUploader::UploadUpdatedFile() is completed for
761 // UpdateFileByResourceId(). 761 // UpdateFileByResourceId().
762 // |callback| must not be null. 762 // |callback| must not be null.
763 void OnUpdatedFileUploaded(const FileOperationCallback& callback, 763 void OnUpdatedFileUploaded(const FileOperationCallback& callback,
764 DriveFileError error, 764 DriveFileError error,
765 scoped_ptr<UploadFileInfo> upload_file_info); 765 scoped_ptr<UploadFileInfo> upload_file_info);
766 766
767 // The following functions are used to forward calls to asynchronous public 767 // The following functions are used to forward calls to asynchronous public
768 // member functions to UI thread. 768 // member functions to UI thread.
769 void SearchAsyncOnUIThread(const std::string& search_query, 769 void SearchAsyncOnUIThread(const std::string& search_query,
770 const GURL& next_feed, 770 const GURL& next_feed,
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 // other threads with base::Unretained(this). 907 // other threads with base::Unretained(this).
908 scoped_ptr<DriveResourceMetadata> resource_metadata_; 908 scoped_ptr<DriveResourceMetadata> resource_metadata_;
909 909
910 // The profile hosts the DriveFileSystem via DriveSystemService. 910 // The profile hosts the DriveFileSystem via DriveSystemService.
911 Profile* profile_; 911 Profile* profile_;
912 912
913 // The cache owned by DriveSystemService. 913 // The cache owned by DriveSystemService.
914 DriveCache* cache_; 914 DriveCache* cache_;
915 915
916 // The uploader owned by DriveSystemService. 916 // The uploader owned by DriveSystemService.
917 GDataUploaderInterface* uploader_; 917 DriveUploaderInterface* uploader_;
918 918
919 // The document service owned by DriveSystemService. 919 // The document service owned by DriveSystemService.
920 DriveServiceInterface* drive_service_; 920 DriveServiceInterface* drive_service_;
921 921
922 // The webapps registry owned by DriveSystemService. 922 // The webapps registry owned by DriveSystemService.
923 DriveWebAppsRegistryInterface* webapps_registry_; 923 DriveWebAppsRegistryInterface* webapps_registry_;
924 924
925 // Periodic timer for checking updates. 925 // Periodic timer for checking updates.
926 base::Timer update_timer_; 926 base::Timer update_timer_;
927 927
(...skipping 19 matching lines...) Expand all
947 // invalidate the weak pointers before any other members are destroyed. 947 // invalidate the weak pointers before any other members are destroyed.
948 base::WeakPtrFactory<DriveFileSystem> ui_weak_ptr_factory_; 948 base::WeakPtrFactory<DriveFileSystem> ui_weak_ptr_factory_;
949 // Unlike other classes, we need this as we need this to redirect a task 949 // Unlike other classes, we need this as we need this to redirect a task
950 // from IO thread to UI thread. 950 // from IO thread to UI thread.
951 base::WeakPtr<DriveFileSystem> ui_weak_ptr_; 951 base::WeakPtr<DriveFileSystem> ui_weak_ptr_;
952 }; 952 };
953 953
954 } // namespace gdata 954 } // namespace gdata
955 955
956 #endif // CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_H_ 956 #endif // CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/drive_download_observer.cc ('k') | chrome/browser/chromeos/gdata/drive_file_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698