| OLD | NEW |
| 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 #pragma once |
| 7 | 8 |
| 8 #include <sys/stat.h> | 9 #include <sys/stat.h> |
| 9 | 10 |
| 10 #include <map> | 11 #include <map> |
| 11 #include <string> | 12 #include <string> |
| 12 #include <vector> | 13 #include <vector> |
| 13 | 14 |
| 14 #include "base/gtest_prod_util.h" | 15 #include "base/gtest_prod_util.h" |
| 15 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/memory/singleton.h" | 17 #include "base/memory/singleton.h" |
| (...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 void NotifyCacheInitialized(); | 850 void NotifyCacheInitialized(); |
| 850 void NotifyFilePinned(const std::string& resource_id, | 851 void NotifyFilePinned(const std::string& resource_id, |
| 851 const std::string& md5); | 852 const std::string& md5); |
| 852 void NotifyFileUnpinned(const std::string& resource_id, | 853 void NotifyFileUnpinned(const std::string& resource_id, |
| 853 const std::string& md5); | 854 const std::string& md5); |
| 854 void NotifyDirectoryChanged(const FilePath& directory_path); | 855 void NotifyDirectoryChanged(const FilePath& directory_path); |
| 855 | 856 |
| 856 // Helper function that completes bookkeeping tasks related to | 857 // Helper function that completes bookkeeping tasks related to |
| 857 // completed file transfer. | 858 // completed file transfer. |
| 858 void OnTransferCompleted( | 859 void OnTransferCompleted( |
| 859 const FilePath& local_file_path, | |
| 860 const FilePath& remote_dest_file_path, | |
| 861 const FileOperationCallback& callback, | 860 const FileOperationCallback& callback, |
| 862 base::PlatformFileError error, | 861 base::PlatformFileError error, |
| 863 DocumentEntry* entry); | 862 UploadFileInfo* upload_file_info); |
| 864 | 863 |
| 865 // Kicks off file upload once it receives |upload_file_info|. | 864 // Kicks off file upload once it receives |upload_file_info|. |
| 866 void StartFileUploadOnUIThread( | 865 void StartFileUploadOnUIThread( |
| 867 const FileOperationCallback& callback, | 866 const FileOperationCallback& callback, |
| 868 base::PlatformFileError* error, | 867 base::PlatformFileError* error, |
| 869 UploadFileInfo* upload_file_info); | 868 UploadFileInfo* upload_file_info); |
| 870 | 869 |
| 871 // Reads properties of |local_file| and fills in values of UploadFileInfo. | 870 // Reads properties of |local_file| and fills in values of UploadFileInfo. |
| 872 static void CreateUploadFileInfoOnIOThreadPool( | 871 static void CreateUploadFileInfoOnIOThreadPool( |
| 873 const FilePath& local_file, | 872 const FilePath& local_file, |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1221 | 1220 |
| 1222 // WeakPtrFactory bound to the IO thread. Created when needed. | 1221 // WeakPtrFactory bound to the IO thread. Created when needed. |
| 1223 scoped_ptr<base::WeakPtrFactory<GDataFileSystem> > io_weak_ptr_factory_; | 1222 scoped_ptr<base::WeakPtrFactory<GDataFileSystem> > io_weak_ptr_factory_; |
| 1224 | 1223 |
| 1225 ObserverList<Observer> observers_; | 1224 ObserverList<Observer> observers_; |
| 1226 }; | 1225 }; |
| 1227 | 1226 |
| 1228 } // namespace gdata | 1227 } // namespace gdata |
| 1229 | 1228 |
| 1230 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 1229 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
| OLD | NEW |