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

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

Issue 10827068: gdata: Fix "save as pdf" to work on Google Drive. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add mock method. 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 const FilePath& local_dest_file_path, 67 const FilePath& local_dest_file_path,
68 const FileOperationCallback& callback) OVERRIDE; 68 const FileOperationCallback& callback) OVERRIDE;
69 virtual void TransferFileFromLocalToRemote( 69 virtual void TransferFileFromLocalToRemote(
70 const FilePath& local_src_file_path, 70 const FilePath& local_src_file_path,
71 const FilePath& remote_dest_file_path, 71 const FilePath& remote_dest_file_path,
72 const FileOperationCallback& callback) OVERRIDE; 72 const FileOperationCallback& callback) OVERRIDE;
73 virtual void OpenFile(const FilePath& file_path, 73 virtual void OpenFile(const FilePath& file_path,
74 const OpenFileCallback& callback) OVERRIDE; 74 const OpenFileCallback& callback) OVERRIDE;
75 virtual void CloseFile(const FilePath& file_path, 75 virtual void CloseFile(const FilePath& file_path,
76 const FileOperationCallback& callback) OVERRIDE; 76 const FileOperationCallback& callback) OVERRIDE;
77 virtual void PrepareWritableFileAndRun(
78 const FilePath& file_path,
79 const OpenFileCallback& callback) OVERRIDE;
77 virtual void Copy(const FilePath& src_file_path, 80 virtual void Copy(const FilePath& src_file_path,
78 const FilePath& dest_file_path, 81 const FilePath& dest_file_path,
79 const FileOperationCallback& callback) OVERRIDE; 82 const FileOperationCallback& callback) OVERRIDE;
80 virtual void Move(const FilePath& src_file_path, 83 virtual void Move(const FilePath& src_file_path,
81 const FilePath& dest_file_path, 84 const FilePath& dest_file_path,
82 const FileOperationCallback& callback) OVERRIDE; 85 const FileOperationCallback& callback) OVERRIDE;
83 virtual void Remove(const FilePath& file_path, 86 virtual void Remove(const FilePath& file_path,
84 bool is_recursive, 87 bool is_recursive,
85 const FileOperationCallback& callback) OVERRIDE; 88 const FileOperationCallback& callback) OVERRIDE;
86 virtual void CreateDirectory(const FilePath& directory_path, 89 virtual void CreateDirectory(const FilePath& directory_path,
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 GDataFileError error, 851 GDataFileError error,
849 scoped_ptr<GDataEntryProto> entry_proto); 852 scoped_ptr<GDataEntryProto> entry_proto);
850 853
851 // Part of RequestDirectoryRefreshOnUIThread(). Called after 854 // Part of RequestDirectoryRefreshOnUIThread(). Called after
852 // GetEntryInfoByPath() is complete. 855 // GetEntryInfoByPath() is complete.
853 void RequestDirectoryRefreshOnUIThreadAfterGetEntryInfo( 856 void RequestDirectoryRefreshOnUIThreadAfterGetEntryInfo(
854 const FilePath& file_path, 857 const FilePath& file_path,
855 GDataFileError error, 858 GDataFileError error,
856 scoped_ptr<GDataEntryProto> entry_proto); 859 scoped_ptr<GDataEntryProto> entry_proto);
857 860
861 // Part of PrepareWritableFilePathAndRun(). It forwards the task to the UI
862 // thread, tries CreateFile for the case file does not exist yet, does
863 // OpenFile to download and mark the file as dirty, runs |callback|, and
864 // finally calls CloseFile.
865 void PrepareWritableFileAndRunOnUIThread(
866 const FilePath& file_path,
867 const OpenFileCallback& callback);
868 void PrepareWritableFileAndRunAfterCreateFile(
869 const FilePath& file_path,
870 const OpenFileCallback& callback,
871 GDataFileError result);
872 void PrepareWritableFileAndRunAfterOpenFile(
873 const FilePath& file_path,
874 const OpenFileCallback& callback,
875 GDataFileError result,
876 const FilePath& local_cache_path);
877 void PrepareWritableFileAndRunAfterCallback(const FilePath& file_path);
878
858 // All members should be accessed only on UI thread. Do not post tasks to 879 // All members should be accessed only on UI thread. Do not post tasks to
859 // other threads with base::Unretained(this). 880 // other threads with base::Unretained(this).
860 scoped_ptr<GDataDirectoryService> directory_service_; 881 scoped_ptr<GDataDirectoryService> directory_service_;
861 882
862 // The profile hosts the GDataFileSystem via GDataSystemService. 883 // The profile hosts the GDataFileSystem via GDataSystemService.
863 Profile* profile_; 884 Profile* profile_;
864 885
865 // The cache owned by GDataSystemService. 886 // The cache owned by GDataSystemService.
866 GDataCache* cache_; 887 GDataCache* cache_;
867 888
(...skipping 22 matching lines...) Expand all
890 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; 911 base::WeakPtr<GDataFileSystem> ui_weak_ptr_;
891 912
892 ObserverList<Observer> observers_; 913 ObserverList<Observer> observers_;
893 914
894 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; 915 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
895 }; 916 };
896 917
897 } // namespace gdata 918 } // namespace gdata
898 919
899 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ 920 #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