| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 void FulfillRequest( | 71 void FulfillRequest( |
| 72 scoped_ptr<chromeos::file_system_provider::RequestValue> value, | 72 scoped_ptr<chromeos::file_system_provider::RequestValue> value, |
| 73 bool has_more); | 73 bool has_more); |
| 74 | 74 |
| 75 // Subclasses implement this for their functionality. | 75 // Subclasses implement this for their functionality. |
| 76 // Called after Parse() is successful, such that |request_id_| and | 76 // Called after Parse() is successful, such that |request_id_| and |
| 77 // |request_manager_| have been fully initialized. | 77 // |request_manager_| have been fully initialized. |
| 78 virtual bool RunWhenValid() = 0; | 78 virtual bool RunWhenValid() = 0; |
| 79 | 79 |
| 80 // ChromeSyncExtensionFunction overrides. | 80 // ChromeSyncExtensionFunction overrides. |
| 81 virtual bool RunSync() OVERRIDE; | 81 virtual bool RunSync() override; |
| 82 | 82 |
| 83 private: | 83 private: |
| 84 // Parses the request in order to extract the request manager. If fails, then | 84 // Parses the request in order to extract the request manager. If fails, then |
| 85 // sets a response and returns false. | 85 // sets a response and returns false. |
| 86 bool Parse(); | 86 bool Parse(); |
| 87 | 87 |
| 88 // Sets an error message in case of a failure. | 88 // Sets an error message in case of a failure. |
| 89 void SetErrorResponse(const std::string& name, const std::string& message); | 89 void SetErrorResponse(const std::string& name, const std::string& message); |
| 90 | 90 |
| 91 int request_id_; | 91 int request_id_; |
| 92 chromeos::file_system_provider::RequestManager* request_manager_; | 92 chromeos::file_system_provider::RequestManager* request_manager_; |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 } // namespace extensions | 95 } // namespace extensions |
| 96 | 96 |
| 97 #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 |