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

Side by Side Diff: chrome/browser/extensions/chrome_extension_function.h

Issue 2404013002: [Extensions] Remove ChromeSyncExtensionFunction (Closed)
Patch Set: Created 4 years, 2 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 | chrome/browser/extensions/chrome_extension_function.cc » ('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 "chrome/browser/extensions/chrome_extension_function_details.h" 8 #include "chrome/browser/extensions/chrome_extension_function_details.h"
9 #include "extensions/browser/extension_function.h" 9 #include "extensions/browser/extension_function.h"
10 10
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // ValidationFailure override to match RunAsync(). 105 // ValidationFailure override to match RunAsync().
106 static bool ValidationFailure(ChromeAsyncExtensionFunction* function); 106 static bool ValidationFailure(ChromeAsyncExtensionFunction* function);
107 107
108 private: 108 private:
109 // If you're hitting a compile error here due to "final" - great! You're doing 109 // If you're hitting a compile error here due to "final" - great! You're doing
110 // the right thing, you just need to extend ChromeUIThreadExtensionFunction 110 // the right thing, you just need to extend ChromeUIThreadExtensionFunction
111 // instead of ChromeAsyncExtensionFunction. 111 // instead of ChromeAsyncExtensionFunction.
112 ResponseAction Run() final; 112 ResponseAction Run() final;
113 }; 113 };
114 114
115 // A chrome specific analog to SyncExtensionFunction. This has access to a
116 // chrome Profile.
117 //
118 // DEPRECATED: Please consider inherting UIThreadExtensionFunction or
119 // SyncExtensionFunction directly. Then if you need access to Chrome details,
120 // you can construct a ChromeExtensionFunctionDetails object within your
121 // function implementation.
122 class ChromeSyncExtensionFunction : public ChromeUIThreadExtensionFunction {
123 public:
124 ChromeSyncExtensionFunction();
125
126 protected:
127 ~ChromeSyncExtensionFunction() override;
128
129 // Deprecated, see SyncExtensionFunction::RunSync.
130 virtual bool RunSync() = 0;
131
132 // ValidationFailure override to match RunSync().
133 static bool ValidationFailure(ChromeSyncExtensionFunction* function);
134
135 private:
136 // If you're hitting a compile error here due to "final" - great! You're doing
137 // the right thing, you just need to extend ChromeUIThreadExtensionFunction
138 // instead of ChromeSyncExtensionFunction.
139 ResponseAction Run() final;
140 };
141
142 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_FUNCTION_H_ 115 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_FUNCTION_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/chrome_extension_function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698