diff options
author | mpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-21 23:52:48 +0000 |
---|---|---|
committer | mpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-21 23:52:48 +0000 |
commit | d9db9154512aa5966215592069490d1d39e88c9e (patch) | |
tree | f6daa03d71cf73fc92f3a45a5a5b58325b84148d /chrome/plugin | |
parent | a6df511aec98ab84faaa1b238335a4640bba940f (diff) | |
download | chromium_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/plugin')
-rw-r--r-- | chrome/plugin/chrome_plugin_host.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/plugin/chrome_plugin_host.cc b/chrome/plugin/chrome_plugin_host.cc index 2002fa90..42d15ef 100644 --- a/chrome/plugin/chrome_plugin_host.cc +++ b/chrome/plugin/chrome_plugin_host.cc @@ -4,11 +4,13 @@ #include "chrome/plugin/chrome_plugin_host.h" +#include "base/command_line.h" #include "base/file_util.h" #include "base/message_loop.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_plugin_lib.h" #include "chrome/common/chrome_plugin_util.h" +#include "chrome/common/chrome_switches.h" #include "chrome/plugin/plugin_process.h" #include "chrome/plugin/plugin_thread.h" #include "chrome/plugin/webplugin_proxy.h" @@ -334,9 +336,9 @@ int STDCALL CPB_GetBrowsingContextInfo( if (buf_size < sizeof(char*)) return sizeof(char*); - std::wstring wretval; - PluginThread::GetPluginThread()->Send( - new PluginProcessHostMsg_GetPluginDataDir(&wretval)); + std::wstring wretval = CommandLine::ForCurrentProcess()-> + GetSwitchValue(switches::kPluginDataDir); + DCHECK(!wretval.empty()); file_util::AppendToPath(&wretval, chrome::kChromePluginDataDirname); *static_cast<char**>(buf) = CPB_StringDup(CPB_Alloc, WideToUTF8(wretval)); return CPERR_SUCCESS; |