Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3802)

Unified Diff: extensions/browser/extension_function.h

Issue 950023005: [Extensions] Apply WARN_UNUSED_RESULT and final keyword to ExtensionFunctions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/browser/extension_function.h
diff --git a/extensions/browser/extension_function.h b/extensions/browser/extension_function.h
index 2e367d33be8597b8c88442b1ea5aedbc966f1806..de1358663a8c8403060db29e6e706d89f26298bd 100644
--- a/extensions/browser/extension_function.h
+++ b/extensions/browser/extension_function.h
@@ -322,14 +322,15 @@ class ExtensionFunction
// ResponseActions.
//
// Respond to the extension immediately with |result|.
- ResponseAction RespondNow(ResponseValue result);
+ ResponseAction RespondNow(ResponseValue result) WARN_UNUSED_RESULT;
// Don't respond now, but promise to call Respond(...) later.
- ResponseAction RespondLater();
+ ResponseAction RespondLater() WARN_UNUSED_RESULT;
// This is the return value of the EXTENSION_FUNCTION_VALIDATE macro, which
// needs to work from Run(), RunAsync(), and RunSync(). The former of those
// has a different return type (ResponseAction) than the latter two (bool).
- static ResponseAction ValidationFailure(ExtensionFunction* function);
+ static ResponseAction ValidationFailure(ExtensionFunction* function)
+ WARN_UNUSED_RESULT;
// If RespondLater() was used, functions must at some point call Respond()
// with |result| as their result.
@@ -588,7 +589,7 @@ class AsyncExtensionFunction : public UIThreadExtensionFunction {
static bool ValidationFailure(AsyncExtensionFunction* function);
private:
- ResponseAction Run() override;
+ ResponseAction Run() final;
};
// A SyncExtensionFunction is an ExtensionFunction that runs synchronously
@@ -615,7 +616,7 @@ class SyncExtensionFunction : public UIThreadExtensionFunction {
static bool ValidationFailure(SyncExtensionFunction* function);
private:
- ResponseAction Run() override;
+ ResponseAction Run() final;
};
class SyncIOThreadExtensionFunction : public IOThreadExtensionFunction {
@@ -636,7 +637,7 @@ class SyncIOThreadExtensionFunction : public IOThreadExtensionFunction {
static bool ValidationFailure(SyncIOThreadExtensionFunction* function);
private:
- ResponseAction Run() override;
+ ResponseAction Run() final;
};
#endif // EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_

Powered by Google App Engine
This is Rietveld 408576698