| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_EXTENSIONS_FILE_SYSTEM_PROVIDER_PROVIDER_FUNCTIO
N_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_SYSTEM_PROVIDER_PROVIDER_FUNCTIO
N_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_SYSTEM_PROVIDER_PROVIDER_FUNCTIO
N_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_SYSTEM_PROVIDER_PROVIDER_FUNCTIO
N_H_ |
| 7 |
| 7 #include <string> | 8 #include <string> |
| 8 | 9 |
| 9 #include "base/files/file.h" | 10 #include "base/files/file.h" |
| 10 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 11 #include "chrome/browser/extensions/chrome_extension_function.h" | 12 #include "chrome/browser/extensions/chrome_extension_function.h" |
| 12 #include "chrome/common/extensions/api/file_system_provider.h" | 13 #include "chrome/common/extensions/api/file_system_provider.h" |
| 13 | 14 |
| 14 namespace base { | 15 namespace base { |
| 15 class DictionaryValue; | 16 class DictionaryValue; |
| 16 } // namespace base | 17 } // namespace base |
| 17 | 18 |
| 18 namespace chromeos { | 19 namespace chromeos { |
| 19 namespace file_system_provider { | 20 namespace file_system_provider { |
| 20 | 21 |
| 21 class RequestManager; | 22 class RequestManager; |
| 22 class RequestValue; | 23 class RequestValue; |
| 23 | 24 |
| 24 } // namespace file_system_provider | 25 } // namespace file_system_provider |
| 25 } // namespace chromeos | 26 } // namespace chromeos |
| 26 | 27 |
| 27 namespace extensions { | 28 namespace extensions { |
| 28 | 29 |
| 29 // Error names from | 30 // Error names from |
| 30 // http://www.w3.org/TR/file-system-api/#errors-and-exceptions | 31 // http://www.w3.org/TR/file-system-api/#errors-and-exceptions |
| 31 extern const char kNotFoundErrorName[]; | 32 extern const char kNotFoundErrorName[]; |
| 32 extern const char kSecurityErrorName[]; | 33 extern const char kSecurityErrorName[]; |
| 33 | 34 |
| 34 // Error messages. | 35 // Error messages. |
| 35 extern const char kEmptyNameErrorMessage[]; | 36 extern const char kEmptyNameErrorMessage[]; |
| 37 extern const char kEmptyIdErrorMessage[]; |
| 36 extern const char kMountFailedErrorMessage[]; | 38 extern const char kMountFailedErrorMessage[]; |
| 37 extern const char kUnmountFailedErrorMessage[]; | 39 extern const char kUnmountFailedErrorMessage[]; |
| 38 extern const char kResponseFailedErrorMessage[]; | 40 extern const char kResponseFailedErrorMessage[]; |
| 39 | 41 |
| 40 // Creates a dictionary, which looks like a DOMError. The returned dictionary | 42 // Creates a dictionary, which looks like a DOMError. The returned dictionary |
| 41 // will be converted to a real DOMError object in | 43 // will be converted to a real DOMError object in |
| 42 // file_system_provier_custom_bindings.js. | 44 // file_system_provier_custom_bindings.js. |
| 43 base::DictionaryValue* CreateError(const std::string& name, | 45 base::DictionaryValue* CreateError(const std::string& name, |
| 44 const std::string& message); | 46 const std::string& message); |
| 45 | 47 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 // Sets an error message in case of a failure. | 86 // Sets an error message in case of a failure. |
| 85 void SetErrorResponse(const std::string& name, const std::string& message); | 87 void SetErrorResponse(const std::string& name, const std::string& message); |
| 86 | 88 |
| 87 int request_id_; | 89 int request_id_; |
| 88 chromeos::file_system_provider::RequestManager* request_manager_; | 90 chromeos::file_system_provider::RequestManager* request_manager_; |
| 89 }; | 91 }; |
| 90 | 92 |
| 91 } // namespace extensions | 93 } // namespace extensions |
| 92 | 94 |
| 93 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_SYSTEM_PROVIDER_PROVIDER_FUNC
TION_H_ | 95 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_SYSTEM_PROVIDER_PROVIDER_FUNC
TION_H_ |
| OLD | NEW |