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

Unified Diff: chrome/browser/extensions/api/web_request/web_request_api.h

Issue 10071035: RefCounted types should not have public destructors, chrome/browser/extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile fix Created 8 years, 8 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: chrome/browser/extensions/api/web_request/web_request_api.h
diff --git a/chrome/browser/extensions/api/web_request/web_request_api.h b/chrome/browser/extensions/api/web_request/web_request_api.h
index 858542686aa1aa745c64aecdf2c6f01c81e42379..8feabba67c5da78b35ce64b509c0b42b96695d48 100644
--- a/chrome/browser/extensions/api/web_request/web_request_api.h
+++ b/chrome/browser/extensions/api/web_request/web_request_api.h
@@ -74,11 +74,6 @@ class ExtensionWebRequestEventRouter {
// Internal representation of the webRequest.RequestFilter type, used to
// filter what network events an extension cares about.
struct RequestFilter {
- URLPatternSet urls;
- std::vector<ResourceType::Type> types;
- int tab_id;
- int window_id;
-
RequestFilter();
~RequestFilter();
@@ -86,6 +81,11 @@ class ExtensionWebRequestEventRouter {
// an error message is provided, otherwise the error is internal (and
// unexpected).
bool InitFromValue(const base::DictionaryValue& value, std::string* error);
+
+ URLPatternSet urls;
+ std::vector<ResourceType::Type> types;
+ int tab_id;
+ int window_id;
};
// Internal representation of the extraInfoSpec parameter on webRequest
@@ -105,6 +105,10 @@ class ExtensionWebRequestEventRouter {
// Contains an extension's response to a blocking event.
struct EventResponse {
+ EventResponse(const std::string& extension_id,
+ const base::Time& extension_install_time);
+ ~EventResponse();
+
// ID of the extension that sent this response.
std::string extension_id;
@@ -122,10 +126,6 @@ class ExtensionWebRequestEventRouter {
scoped_ptr<net::AuthCredentials> auth_credentials;
- EventResponse(const std::string& extension_id,
- const base::Time& extension_install_time);
- ~EventResponse();
-
DISALLOW_COPY_AND_ASSIGN(EventResponse);
};
@@ -258,6 +258,7 @@ class ExtensionWebRequestEventRouter {
private:
friend struct DefaultSingletonTraits<ExtensionWebRequestEventRouter>;
+
struct EventListener;
typedef std::map<std::string, std::set<EventListener> > ListenerMapForProfile;
typedef std::map<void*, ListenerMapForProfile> ListenerMap;
@@ -376,28 +377,40 @@ class ExtensionWebRequestEventRouter {
class WebRequestAddEventListener : public SyncIOThreadExtensionFunction {
public:
- virtual bool RunImpl() OVERRIDE;
DECLARE_EXTENSION_FUNCTION_NAME("webRequest.addEventListener");
+
+ protected:
+ virtual ~WebRequestAddEventListener() {}
+
+ // ExtensionFunction:
+ virtual bool RunImpl() OVERRIDE;
};
class WebRequestEventHandled : public SyncIOThreadExtensionFunction {
public:
- virtual bool RunImpl() OVERRIDE;
DECLARE_EXTENSION_FUNCTION_NAME("webRequest.eventHandled");
+
+ protected:
+ virtual ~WebRequestEventHandled() {}
+
+ // ExtensionFunction:
+ virtual bool RunImpl() OVERRIDE;
};
class WebRequestHandlerBehaviorChanged : public SyncIOThreadExtensionFunction {
public:
- virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME(
- "webRequest.handlerBehaviorChanged");
+ DECLARE_EXTENSION_FUNCTION_NAME("webRequest.handlerBehaviorChanged");
- private:
+ protected:
+ virtual ~WebRequestHandlerBehaviorChanged() {}
+
+ // ExtensionFunction:
virtual void GetQuotaLimitHeuristics(
QuotaLimitHeuristics* heuristics) const OVERRIDE;
// Handle quota exceeded gracefully: Only warn the user but still execute the
// function.
virtual void OnQuotaExceeded() OVERRIDE;
+ virtual bool RunImpl() OVERRIDE;
};
// Send updates to |host| with information about what webRequest-related

Powered by Google App Engine
This is Rietveld 408576698