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

Unified Diff: chrome/plugin/chrome_plugin_host.cc

Issue 18604: Fix a timing issue that caused gears to fail to load sometimes.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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
« no previous file with comments | « chrome/common/plugin_messages_internal.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/plugin/chrome_plugin_host.cc
===================================================================
--- chrome/plugin/chrome_plugin_host.cc (revision 8379)
+++ chrome/plugin/chrome_plugin_host.cc (working copy)
@@ -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 @@
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;
« no previous file with comments | « chrome/common/plugin_messages_internal.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698