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

Unified Diff: content/browser/plugin_service.h

Issue 8493019: Refactor PluginService to take PluginList as a dependency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comment Created 9 years, 1 month 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/plugin_service.h
diff --git a/content/browser/plugin_service.h b/content/browser/plugin_service.h
index 0e8bcb9cfb6adfdf28a61ca33772a2432021c62c..bc173beb8d8820fe2e784f433e6583bfd08a6fae 100644
--- a/content/browser/plugin_service.h
+++ b/content/browser/plugin_service.h
@@ -81,6 +81,9 @@ class CONTENT_EXPORT PluginService
// Returns the PluginService singleton.
static PluginService* GetInstance();
+ // Must be called on the instance to finish initialization.
+ void Init();
+
// Starts watching for changes in the list of installed plug-ins.
void StartWatchingPlugins();
@@ -173,7 +176,6 @@ class CONTENT_EXPORT PluginService
}
content::PluginServiceFilter* filter() { return filter_; }
-
// The following functions are wrappers around webkit::npapi::PluginList.
// These must be used instead of those in order to ensure that we have a
// single global list in the component build and so that we don't
@@ -189,6 +191,8 @@ class CONTENT_EXPORT PluginService
// TODO(dpranke): This should be private.
webkit::npapi::PluginList* plugin_list();
+ void SetPluginListForTesting(webkit::npapi::PluginList* plugin_list);
+
private:
friend struct DefaultSingletonTraits<PluginService>;
@@ -245,6 +249,12 @@ class CONTENT_EXPORT PluginService
base::files::FilePathWatcher::Delegate* delegate);
#endif
+ // Whether or not the Init() method was called.
+ bool did_init_;
+
+ // The plugin list instance.
+ webkit::npapi::PluginList* plugin_list_;
+
// The browser's UI locale.
const std::string ui_locale_;

Powered by Google App Engine
This is Rietveld 408576698