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

Side by Side Diff: extensions/browser/extension_function.h

Issue 2204363002: [Extensions] Remove SyncIOThreadExtensionFunction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lazyboy@'s Created 4 years, 4 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
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 EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_ 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_
6 #define EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_ 6 #define EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 693
694 private: 694 private:
695 // If you're hitting a compile error here due to "final" - great! You're 695 // If you're hitting a compile error here due to "final" - great! You're
696 // doing the right thing, you just need to extend UIThreadExtensionFunction 696 // doing the right thing, you just need to extend UIThreadExtensionFunction
697 // instead of SyncExtensionFunction. 697 // instead of SyncExtensionFunction.
698 ResponseAction Run() final; 698 ResponseAction Run() final;
699 699
700 DISALLOW_COPY_AND_ASSIGN(SyncExtensionFunction); 700 DISALLOW_COPY_AND_ASSIGN(SyncExtensionFunction);
701 }; 701 };
702 702
703 class SyncIOThreadExtensionFunction : public IOThreadExtensionFunction {
704 public:
705 SyncIOThreadExtensionFunction();
706
707 protected:
708 ~SyncIOThreadExtensionFunction() override;
709
710 // Deprecated: Override IOThreadExtensionFunction and implement Run() instead.
711 //
712 // SyncIOThreadExtensionFunctions implement this method. Return true to
713 // respond immediately with success, false to respond immediately with an
714 // error.
715 virtual bool RunSync() = 0;
716
717 // ValidationFailure override to match RunSync().
718 static bool ValidationFailure(SyncIOThreadExtensionFunction* function);
719
720 private:
721 // If you're hitting a compile error here due to "final" - great! You're
722 // doing the right thing, you just need to extend IOThreadExtensionFunction
723 // instead of SyncIOExtensionFunction.
724 ResponseAction Run() final;
725
726 DISALLOW_COPY_AND_ASSIGN(SyncIOThreadExtensionFunction);
727 };
728
729 #endif // EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_ 703 #endif // EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_
OLDNEW
« no previous file with comments | « extensions/browser/api/web_request/web_request_api.cc ('k') | extensions/browser/extension_function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698