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 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 // Base class for internal API functions handling request results, either | 53 // Base class for internal API functions handling request results, either |
54 // a success or a failure. | 54 // a success or a failure. |
55 class FileSystemProviderInternalFunction : public ChromeSyncExtensionFunction { | 55 class FileSystemProviderInternalFunction : public ChromeSyncExtensionFunction { |
56 public: | 56 public: |
57 FileSystemProviderInternalFunction(); | 57 FileSystemProviderInternalFunction(); |
58 | 58 |
59 protected: | 59 protected: |
60 virtual ~FileSystemProviderInternalFunction() {} | 60 virtual ~FileSystemProviderInternalFunction() {} |
61 | 61 |
62 // Rejects the request and sets a response for this API function. | 62 // Rejects the request and sets a response for this API function. |
63 void RejectRequest(base::File::Error error); | 63 void RejectRequest( |
| 64 scoped_ptr<chromeos::file_system_provider::RequestValue> value, |
| 65 base::File::Error error); |
64 | 66 |
65 // Fulfills the request with parsed arguments of this API function | 67 // Fulfills the request with parsed arguments of this API function |
66 // encapsulated as a RequestValue instance. Also, sets a response. | 68 // encapsulated as a RequestValue instance. Also, sets a response. |
67 // If |has_more| is set to true, then the function will be called again for | 69 // If |has_more| is set to true, then the function will be called again for |
68 // this request. | 70 // this request. |
69 void FulfillRequest( | 71 void FulfillRequest( |
70 scoped_ptr<chromeos::file_system_provider::RequestValue> value, | 72 scoped_ptr<chromeos::file_system_provider::RequestValue> value, |
71 bool has_more); | 73 bool has_more); |
72 | 74 |
73 // Subclasses implement this for their functionality. | 75 // Subclasses implement this for their functionality. |
(...skipping 12 matching lines...) Expand all Loading... |
86 // Sets an error message in case of a failure. | 88 // Sets an error message in case of a failure. |
87 void SetErrorResponse(const std::string& name, const std::string& message); | 89 void SetErrorResponse(const std::string& name, const std::string& message); |
88 | 90 |
89 int request_id_; | 91 int request_id_; |
90 chromeos::file_system_provider::RequestManager* request_manager_; | 92 chromeos::file_system_provider::RequestManager* request_manager_; |
91 }; | 93 }; |
92 | 94 |
93 } // namespace extensions | 95 } // namespace extensions |
94 | 96 |
95 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_SYSTEM_PROVIDER_PROVIDER_FUNC
TION_H_ | 97 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_SYSTEM_PROVIDER_PROVIDER_FUNC
TION_H_ |
OLD | NEW |