| Index: chrome/browser/extensions/extension_function.h
|
| ===================================================================
|
| --- chrome/browser/extensions/extension_function.h (revision 20334)
|
| +++ chrome/browser/extensions/extension_function.h (working copy)
|
| @@ -93,8 +93,15 @@
|
| virtual void SetArgs(const std::string& args);
|
| virtual const std::string GetResult();
|
| virtual const std::string GetError() { return error_; }
|
| - virtual void Run() = 0;
|
| + virtual void Run() {
|
| + if (!RunImpl())
|
| + SendResponse(false);
|
| + }
|
|
|
| + // Derived classes should implement this method to do their work and return
|
| + // success/failure.
|
| + virtual bool RunImpl() = 0;
|
| +
|
| protected:
|
| void SendResponse(bool success);
|
|
|
| @@ -107,7 +114,7 @@
|
| Value* args_;
|
|
|
| // The result of the API. This should be populated by the derived class before
|
| - // Run() returns.
|
| + // SendResponse() is called.
|
| scoped_ptr<Value> result_;
|
|
|
| // Any detailed error from the API. This should be populated by the derived
|
|
|
| Property changes on: chrome\browser\extensions\extension_function.h
|
| ___________________________________________________________________
|
| Added: svn:eol-style
|
| + LF
|
|
|
|
|