summaryrefslogtreecommitdiffstats
path: root/chrome/browser/plugin_process_host.cc
diff options
context:
space:
mode:
authormpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-21 23:52:48 +0000
committermpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-21 23:52:48 +0000
commitd9db9154512aa5966215592069490d1d39e88c9e (patch)
treef6daa03d71cf73fc92f3a45a5a5b58325b84148d /chrome/browser/plugin_process_host.cc
parenta6df511aec98ab84faaa1b238335a4640bba940f (diff)
downloadchromium_src-d9db9154512aa5966215592069490d1d39e88c9e.zip
chromium_src-d9db9154512aa5966215592069490d1d39e88c9e.tar.gz
chromium_src-d9db9154512aa5966215592069490d1d39e88c9e.tar.bz2
Fix a timing issue that caused gears to fail to load sometimes.
BUG=http://b/issue?id=1559007 BUG=http://code.google.com/p/chromium/issues/detail?id=4219 Review URL: http://codereview.chromium.org/18604 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8417 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/plugin_process_host.cc')
-rw-r--r--chrome/browser/plugin_process_host.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc
index 9da52d2..0362423 100644
--- a/chrome/browser/plugin_process_host.cc
+++ b/chrome/browser/plugin_process_host.cc
@@ -511,6 +511,11 @@ bool PluginProcessHost::Init(const FilePath& plugin_path,
cmd_line.AppendSwitchWithValue(switches::kLang, locale);
}
+ // Gears requires the data dir to be available on startup.
+ std::wstring data_dir = plugin_service_->GetChromePluginDataDir();;
+ DCHECK(!data_dir.empty());
+ cmd_line.AppendSwitchWithValue(switches::kPluginDataDir, data_dir);
+
cmd_line.AppendSwitchWithValue(switches::kProcessType,
switches::kPluginProcess);
@@ -650,8 +655,6 @@ void PluginProcessHost::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(PluginProcessHostMsg_ShutdownRequest,
OnPluginShutdownRequest)
IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginMessage, OnPluginMessage)
- IPC_MESSAGE_HANDLER(PluginProcessHostMsg_GetPluginDataDir,
- OnGetPluginDataDir)
IPC_MESSAGE_HANDLER(ViewHostMsg_RequestResource, OnRequestResource)
IPC_MESSAGE_HANDLER(ViewHostMsg_CancelRequest, OnCancelRequest)
IPC_MESSAGE_HANDLER(ViewHostMsg_DataReceived_ACK, OnDataReceivedACK)
@@ -918,10 +921,6 @@ void PluginProcessHost::OnPluginMessage(
}
}
-void PluginProcessHost::OnGetPluginDataDir(std::wstring* retval) {
- *retval = plugin_service_->GetChromePluginDataDir();
-}
-
void PluginProcessHost::OnCreateWindow(HWND parent, IPC::Message* reply_msg) {
// Need to create this window on the UI thread.
plugin_service_->main_message_loop()->PostTask(FROM_HERE,