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

Unified Diff: content/browser/renderer_host/pepper/pepper_message_filter.h

Issue 10919169: Change how PepperMessageFilter is constructed, to simplify its use. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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: content/browser/renderer_host/pepper/pepper_message_filter.h
===================================================================
--- content/browser/renderer_host/pepper/pepper_message_filter.h (revision 155271)
+++ content/browser/renderer_host/pepper/pepper_message_filter.h (working copy)
@@ -73,7 +73,7 @@
// Constructor when used in the context of a PPAPI process (the argument is
// provided for sanity checking).
PepperMessageFilter(ProcessType type,
- net::HostResolver* host_resolver);
+ int render_process_id);
// content::BrowserMessageFilter methods.
virtual void OverrideThreadForMessage(
@@ -85,10 +85,6 @@
// net::NetworkChangeNotifier::IPAddressObserver interface.
virtual void OnIPAddressChanged() OVERRIDE;
- // Returns the host resolver (it may come from the resource context or the
- // host_resolver_ member).
- net::HostResolver* GetHostResolver();
-
net::CertVerifier* GetCertVerifier();
// Adds already accepted socket to the internal TCP sockets table. Takes
@@ -240,18 +236,20 @@
void DoGetNetworkList();
void SendNetworkList(scoped_ptr<net::NetworkInterfaceList> list);
+ // Call this method on the UI thread to ensure that resource_context_ is
+ // set before use in the PLUGIN case.
+ void EnsureResourceContextSet();
+
ProcessType process_type_;
// Render process ID.
int process_id_;
- // When non-NULL, this should be used instead of the host_resolver_.
- content::ResourceContext* const resource_context_;
+ // This is initialized in the constructor in the RENDERER case. In the PLUGIN
+ // case, it should be initialized by calling EnsureResourceContextSet before
+ // it is used.
+ content::ResourceContext* resource_context_;
- // When non-NULL, this should be used instead of the resource_context_. Use
- // GetHostResolver instead of accessing directly.
- net::HostResolver* host_resolver_;
-
// The default SSL configuration settings are used, as opposed to Chrome's SSL
// settings.
net::SSLConfig ssl_config_;

Powered by Google App Engine
This is Rietveld 408576698