summaryrefslogtreecommitdiffstats
path: root/content/browser/plugin_service_impl.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-10 19:31:57 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-10 19:31:57 +0000
commitb4e74ee7fa50d5880f6cfdb6e2d10c8e8bb98cc1 (patch)
tree40c6afa656bd48496d696790e9d47a4a7df4b315 /content/browser/plugin_service_impl.cc
parent0a424afc9c94380ecd80967be73cfb684b6ae3f4 (diff)
downloadchromium_src-b4e74ee7fa50d5880f6cfdb6e2d10c8e8bb98cc1.zip
chromium_src-b4e74ee7fa50d5880f6cfdb6e2d10c8e8bb98cc1.tar.gz
chromium_src-b4e74ee7fa50d5880f6cfdb6e2d10c8e8bb98cc1.tar.bz2
Move creation and ownership of ResourceDispatcherHost and PluginService to content. This gives a few benefits:
-avoid having each embedder know when to create/destruct these objects, as well as contained objects (i.e. those related to downloads) -avoid having to tell embedders about specifics of BrowserThread startup/shutdown -move ResourceDispatcherHost's getter to content where it belongs Some code (extensions+promos) used the fact that RDH is NULL in unittests as a signal to not use the utility process. I've switches those unittests to set a flag on the objects instead. I've taken out the DnsParallelism field trial (not used anymore, confirmed with jar) as it was the only thing that caused MetricsService to depend on IOThread initialization, which also depended on MetricsService (through FieldTrials). This two-sided dependency always annoyed me and made the code hard to restructure. BUG=98716 Review URL: http://codereview.chromium.org/9150016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117078 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/plugin_service_impl.cc')
-rw-r--r--content/browser/plugin_service_impl.cc11
1 files changed, 2 insertions, 9 deletions
diff --git a/content/browser/plugin_service_impl.cc b/content/browser/plugin_service_impl.cc
index 8cd4cbc..4dcc47c 100644
--- a/content/browser/plugin_service_impl.cc
+++ b/content/browser/plugin_service_impl.cc
@@ -135,10 +135,7 @@ PluginServiceImpl* PluginServiceImpl::GetInstance() {
}
PluginServiceImpl::PluginServiceImpl()
- : plugin_list_(NULL),
- ui_locale_(
- content::GetContentClient()->browser()->GetApplicationLocale()),
- filter_(NULL) {
+ : plugin_list_(NULL), filter_(NULL) {
}
PluginServiceImpl::~PluginServiceImpl() {
@@ -232,10 +229,6 @@ void PluginServiceImpl::StartWatchingPlugins() {
#endif
}
-const std::string& PluginServiceImpl::GetUILocale() {
- return ui_locale_;
-}
-
PluginProcessHost* PluginServiceImpl::FindNpapiPluginProcess(
const FilePath& plugin_path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
@@ -297,7 +290,7 @@ PluginProcessHost* PluginServiceImpl::FindOrStartNpapiPluginProcess(
// This plugin isn't loaded by any plugin process, so create a new process.
scoped_ptr<PluginProcessHost> new_host(new PluginProcessHost());
- if (!new_host->Init(info, ui_locale_)) {
+ if (!new_host->Init(info)) {
NOTREACHED(); // Init is not expected to fail.
return NULL;
}