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

Side by Side Diff: chrome/browser/extensions/chrome_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 unified diff | Download patch
« no previous file with comments | « no previous file | extensions/browser/extension_function.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_FUNCTION_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_FUNCTION_H_
6 #define CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_FUNCTION_H_ 6 #define CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_FUNCTION_H_
7 7
8 #include "extensions/browser/extension_function.h" 8 #include "extensions/browser/extension_function.h"
9 9
10 class Browser; 10 class Browser;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 protected: 80 protected:
81 ~ChromeAsyncExtensionFunction() override; 81 ~ChromeAsyncExtensionFunction() override;
82 82
83 // Deprecated, see AsyncExtensionFunction::RunAsync. 83 // Deprecated, see AsyncExtensionFunction::RunAsync.
84 virtual bool RunAsync() = 0; 84 virtual bool RunAsync() = 0;
85 85
86 // ValidationFailure override to match RunAsync(). 86 // ValidationFailure override to match RunAsync().
87 static bool ValidationFailure(ChromeAsyncExtensionFunction* function); 87 static bool ValidationFailure(ChromeAsyncExtensionFunction* function);
88 88
89 private: 89 private:
90 ResponseAction Run() override; 90 ResponseAction Run() final;
Devlin 2015/02/24 17:04:42 Even though there's about a half dozen of these, I
not at google - send to devlin 2015/02/25 16:00:30 "Should implement" contradicts the comment on line
91 }; 91 };
92 92
93 // A chrome specific analog to SyncExtensionFunction. This has access to a 93 // A chrome specific analog to SyncExtensionFunction. This has access to a
94 // chrome Profile. 94 // chrome Profile.
95 // 95 //
96 // DEPRECATED: Please consider inherting UIThreadExtensionFunction or 96 // DEPRECATED: Please consider inherting UIThreadExtensionFunction or
97 // SyncExtensionFunction directly. Then if you need access to Chrome details, 97 // SyncExtensionFunction directly. Then if you need access to Chrome details,
98 // you can construct a ChromeExtensionFunctionDetails object within your 98 // you can construct a ChromeExtensionFunctionDetails object within your
99 // function implementation. 99 // function implementation.
100 class ChromeSyncExtensionFunction : public ChromeUIThreadExtensionFunction { 100 class ChromeSyncExtensionFunction : public ChromeUIThreadExtensionFunction {
101 public: 101 public:
102 ChromeSyncExtensionFunction(); 102 ChromeSyncExtensionFunction();
103 103
104 protected: 104 protected:
105 ~ChromeSyncExtensionFunction() override; 105 ~ChromeSyncExtensionFunction() override;
106 106
107 // Deprecated, see SyncExtensionFunction::RunSync. 107 // Deprecated, see SyncExtensionFunction::RunSync.
108 virtual bool RunSync() = 0; 108 virtual bool RunSync() = 0;
109 109
110 // ValidationFailure override to match RunSync(). 110 // ValidationFailure override to match RunSync().
111 static bool ValidationFailure(ChromeSyncExtensionFunction* function); 111 static bool ValidationFailure(ChromeSyncExtensionFunction* function);
112 112
113 private: 113 private:
114 ResponseAction Run() override; 114 ResponseAction Run() final;
115 }; 115 };
116 116
117 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_FUNCTION_H_ 117 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_FUNCTION_H_
OLDNEW
« no previous file with comments | « no previous file | extensions/browser/extension_function.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698