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

Unified Diff: chrome/browser/plugin_process_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/browser/plugin_process_host.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugin_process_host.cc
===================================================================
--- chrome/browser/plugin_process_host.cc (revision 8379)
+++ chrome/browser/plugin_process_host.cc (working copy)
@@ -511,6 +511,11 @@
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 @@
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::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,
« no previous file with comments | « chrome/browser/plugin_process_host.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698