| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_ARC_FILEAPI_INTENT_HELPER_UTIL_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_FILE_SYSTEM_INSTANCE_UTIL_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_INTENT_HELPER_UTIL_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_FILE_SYSTEM_INSTANCE_UTIL_H_ |
| 7 | 7 |
| 8 #include "components/arc/common/intent_helper.mojom.h" | 8 #include "components/arc/common/file_system.mojom.h" |
| 9 #include "url/gurl.h" | 9 |
| 10 class GURL; |
| 10 | 11 |
| 11 namespace arc { | 12 namespace arc { |
| 12 namespace intent_helper_util { | 13 namespace file_system_instance_util { |
| 13 | 14 |
| 14 using GetFileSizeCallback = | 15 using GetFileSizeCallback = mojom::FileSystemInstance::GetFileSizeCallback; |
| 15 mojom::IntentHelperInstance::GetFileSizeDeprecatedCallback; | |
| 16 using OpenFileToReadCallback = | 16 using OpenFileToReadCallback = |
| 17 mojom::IntentHelperInstance::OpenFileToReadDeprecatedCallback; | 17 mojom::FileSystemInstance::OpenFileToReadCallback; |
| 18 | 18 |
| 19 // Utility which posts a task to run GetFileSize. | 19 // Utility which posts a task to run GetFileSize. |
| 20 // This function must be called on the IO thread. | 20 // This function must be called on the IO thread. |
| 21 void GetFileSizeOnIOThread(const GURL& arc_url, | 21 void GetFileSizeOnIOThread(const GURL& arc_url, |
| 22 const GetFileSizeCallback& callback); | 22 const GetFileSizeCallback& callback); |
| 23 | 23 |
| 24 // Utility which posts a task to run OpenFileToRead. | 24 // Utility which posts a task to run OpenFileToRead. |
| 25 // This function must be called on the IO thread. | 25 // This function must be called on the IO thread. |
| 26 void OpenFileToReadOnIOThread(const GURL& arc_url, | 26 void OpenFileToReadOnIOThread(const GURL& arc_url, |
| 27 const OpenFileToReadCallback& callback); | 27 const OpenFileToReadCallback& callback); |
| 28 | 28 |
| 29 } // namespace intent_helper_util | 29 } // namespace file_system_instance_util |
| 30 } // namespace arc | 30 } // namespace arc |
| 31 | 31 |
| 32 #endif // CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_INTENT_HELPER_UTIL_H_ | 32 #endif // CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_FILE_SYSTEM_INSTANCE_UTIL_H_ |
| OLD | NEW |