| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "chrome/browser/extensions/chrome_extension_function.h" | 5 #include "chrome/browser/extensions/chrome_extension_function.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "chrome/browser/extensions/chrome_extension_function_details.h" | 9 #include "chrome/browser/extensions/chrome_extension_function_details.h" |
| 10 #include "chrome/browser/extensions/window_controller.h" | 10 #include "chrome/browser/extensions/window_controller.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 if (results_) | 88 if (results_) |
| 89 return RespondNow(ErrorWithArguments(std::move(results_), error_)); | 89 return RespondNow(ErrorWithArguments(std::move(results_), error_)); |
| 90 return RespondNow(Error(error_)); | 90 return RespondNow(Error(error_)); |
| 91 } | 91 } |
| 92 | 92 |
| 93 // static | 93 // static |
| 94 bool ChromeAsyncExtensionFunction::ValidationFailure( | 94 bool ChromeAsyncExtensionFunction::ValidationFailure( |
| 95 ChromeAsyncExtensionFunction* function) { | 95 ChromeAsyncExtensionFunction* function) { |
| 96 return false; | 96 return false; |
| 97 } | 97 } |
| 98 | |
| 99 ChromeSyncExtensionFunction::ChromeSyncExtensionFunction() { | |
| 100 } | |
| 101 | |
| 102 ChromeSyncExtensionFunction::~ChromeSyncExtensionFunction() {} | |
| 103 | |
| 104 ExtensionFunction::ResponseAction ChromeSyncExtensionFunction::Run() { | |
| 105 if (!RunSync()) { | |
| 106 DCHECK(!results_); | |
| 107 return RespondNow(Error(error_)); | |
| 108 } | |
| 109 return RespondNow(ArgumentList(std::move(results_))); | |
| 110 } | |
| 111 | |
| 112 // static | |
| 113 bool ChromeSyncExtensionFunction::ValidationFailure( | |
| 114 ChromeSyncExtensionFunction* function) { | |
| 115 return false; | |
| 116 } | |
| OLD | NEW |