Chromium Code Reviews| 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_ARC_FILE_SYSTEM_INSTANCE_UTIL_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_FILE_SYSTEM_OPERATION_RUNNER_UTI L_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_FILE_SYSTEM_INSTANCE_UTIL_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_FILE_SYSTEM_OPERATION_RUNNER_UTI L_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "components/arc/common/file_system.mojom.h" | 10 #include "components/arc/common/file_system.mojom.h" |
| 11 | 11 |
| 12 class GURL; | |
| 13 | |
| 14 namespace arc { | 12 namespace arc { |
| 15 namespace file_system_instance_util { | 13 namespace file_system_operation_runner_util { |
| 16 | 14 |
| 17 using GetFileSizeCallback = mojom::FileSystemInstance::GetFileSizeCallback; | 15 using GetFileSizeCallback = mojom::FileSystemInstance::GetFileSizeCallback; |
| 18 using OpenFileToReadCallback = | 16 using OpenFileToReadCallback = |
| 19 mojom::FileSystemInstance::OpenFileToReadCallback; | 17 mojom::FileSystemInstance::OpenFileToReadCallback; |
| 20 using GetDocumentCallback = mojom::FileSystemInstance::GetDocumentCallback; | 18 using GetDocumentCallback = mojom::FileSystemInstance::GetDocumentCallback; |
| 21 using GetChildDocumentsCallback = | 19 using GetChildDocumentsCallback = |
| 22 mojom::FileSystemInstance::GetChildDocumentsCallback; | 20 mojom::FileSystemInstance::GetChildDocumentsCallback; |
| 23 | 21 |
| 24 // Utility functions to post a task to run FileSystemInstance methods. | 22 // Utility functions to post a task to run ArcFileSystemOperationRunner methods. |
| 25 // These functions must be called on the IO thread. | 23 // These functions must be called on the IO thread. |
| 26 void GetFileSizeOnIOThread(const GURL& arc_url, | 24 void GetFileSizeOnIOThread(const std::string& url, |
|
hidehiko
2017/01/20 08:01:49
Clarification: Any reasons you change GURL to std:
Shuhei Takahashi
2017/01/20 09:13:04
OK, let's stick with GURL.
| |
| 27 const GetFileSizeCallback& callback); | 25 const GetFileSizeCallback& callback); |
| 28 void OpenFileToReadOnIOThread(const GURL& arc_url, | 26 void OpenFileToReadOnIOThread(const std::string& url, |
| 29 const OpenFileToReadCallback& callback); | 27 const OpenFileToReadCallback& callback); |
| 30 void GetDocumentOnIOThread(const std::string& authority, | 28 void GetDocumentOnIOThread(const std::string& authority, |
| 31 const std::string& document_id, | 29 const std::string& document_id, |
| 32 const GetDocumentCallback& callback); | 30 const GetDocumentCallback& callback); |
| 33 void GetChildDocumentsOnIOThread(const std::string& authority, | 31 void GetChildDocumentsOnIOThread(const std::string& authority, |
| 34 const std::string& parent_document_id, | 32 const std::string& parent_document_id, |
| 35 const GetChildDocumentsCallback& callback); | 33 const GetChildDocumentsCallback& callback); |
| 36 | 34 |
| 37 } // namespace file_system_instance_util | 35 } // namespace file_system_operation_runner_util |
| 38 } // namespace arc | 36 } // namespace arc |
| 39 | 37 |
| 40 #endif // CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_FILE_SYSTEM_INSTANCE_UTIL_H_ | 38 #endif // CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_FILE_SYSTEM_OPERATION_RUNNER_ UTIL_H_ |
| OLD | NEW |