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

Unified Diff: chrome_frame/chrome_frame_automation.cc

Issue 5090001: Make use of the new version flag in Chrome to load the correct chrome.dll ver... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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 | « no previous file | chrome_frame/chrome_launcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/chrome_frame_automation.cc
===================================================================
--- chrome_frame/chrome_frame_automation.cc (revision 66270)
+++ chrome_frame/chrome_frame_automation.cc (working copy)
@@ -45,6 +45,15 @@
// threads.
Lock g_ChromeFrameHistogramLock;
+namespace {
+std::wstring GetCurrentModuleVersion() {
+ scoped_ptr<FileVersionInfo> module_version_info(
+ FileVersionInfo::CreateFileVersionInfoForCurrentModule());
+ DCHECK(module_version_info.get() != NULL);
+ return module_version_info->file_version();
+}
+}
+
class ChromeFrameAutomationProxyImpl::TabProxyNotificationMessageFilter
: public IPC::ChannelProxy::MessageFilter {
public:
@@ -305,6 +314,10 @@
command_line->AppendSwitchPath(switches::kUserDataDir,
params->profile_path());
+ // Ensure that Chrome is running the specified version of chrome.dll.
+ command_line->AppendSwitchNative(switches::kChromeVersion,
+ GetCurrentModuleVersion());
+
if (!params->language().empty())
command_line->AppendSwitchNative(switches::kLang, params->language());
@@ -1301,14 +1314,7 @@
}
std::wstring ChromeFrameAutomationClient::GetVersion() const {
- static FileVersionInfo* version_info =
- FileVersionInfo::CreateFileVersionInfoForCurrentModule();
-
- std::wstring version;
- if (version_info)
- version = version_info->product_version();
-
- return version;
+ return GetCurrentModuleVersion();
}
void ChromeFrameAutomationClient::Print(HDC print_dc,
« no previous file with comments | « no previous file | chrome_frame/chrome_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698