diff options
author | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-11 20:39:18 +0000 |
---|---|---|
committer | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-11 20:39:18 +0000 |
commit | c41468f5e92ef7bcc7f223b809b9eab5ccf78635 (patch) | |
tree | 529f884cc317376e8972418a0e423603c303962c /chrome/installer | |
parent | d62373fa58514f213ed116ae984eaae942dce018 (diff) | |
download | chromium_src-c41468f5e92ef7bcc7f223b809b9eab5ccf78635.zip chromium_src-c41468f5e92ef7bcc7f223b809b9eab5ccf78635.tar.gz chromium_src-c41468f5e92ef7bcc7f223b809b9eab5ccf78635.tar.bz2 |
Add NPAPI plugin registration persistence code to chrome frame. If the DLL is already registered as an NPAPI plugin, keep that registration information up to date across updates.
Review URL: http://codereview.chromium.org/385015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31697 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer')
-rw-r--r-- | chrome/installer/util/install_util.cc | 11 | ||||
-rw-r--r-- | chrome/installer/util/install_util.h | 3 | ||||
-rw-r--r-- | chrome/installer/util/util_constants.cc | 1 | ||||
-rw-r--r-- | chrome/installer/util/util_constants.h | 1 |
4 files changed, 14 insertions, 2 deletions
diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc index c5d3e80..25f3046b 100644 --- a/chrome/installer/util/install_util.cc +++ b/chrome/installer/util/install_util.cc @@ -15,6 +15,7 @@ #include "base/command_line.h" #include "base/file_util.h" #include "base/logging.h" +#include "base/path_service.h" #include "base/registry.h" #include "base/scoped_ptr.h" #include "base/string_util.h" @@ -133,7 +134,15 @@ bool InstallUtil::IsChromeFrameProcess() { CommandLine* command_line = CommandLine::ForCurrentProcess(); DCHECK(command_line) << "IsChromeFrameProcess() called before ComamandLine::Init()"; - return command_line->HasSwitch(installer_util::switches::kChromeFrame); + + // Also assume this to be a ChromeFrame process if we are running inside + // the Chrome Frame DLL. + FilePath module_path; + PathService::Get(base::FILE_MODULE, &module_path); + std::wstring module_name(module_path.BaseName().value()); + + return command_line->HasSwitch(installer_util::switches::kChromeFrame) || + module_name == installer_util::kChromeFrameDll; } bool InstallUtil::BuildDLLRegistrationList(const std::wstring& install_path, diff --git a/chrome/installer/util/install_util.h b/chrome/installer/util/install_util.h index 3ce4166..8f9e0d8 100644 --- a/chrome/installer/util/install_util.h +++ b/chrome/installer/util/install_util.h @@ -56,7 +56,8 @@ class InstallUtil { static bool IsPerUserInstall(const wchar_t* const exe_path); // Returns true if this is a Chrome Frame installation (as indicated by the - // presence of --chrome-frame on the command line). + // presence of --chrome-frame on the command line) or if this is running + // inside of the Chrome Frame dll. static bool IsChromeFrameProcess(); // Adds all DLLs in install_path whose names are given by dll_names to a diff --git a/chrome/installer/util/util_constants.cc b/chrome/installer/util/util_constants.cc index 046acfe..64544c4 100644 --- a/chrome/installer/util/util_constants.cc +++ b/chrome/installer/util/util_constants.cc @@ -113,6 +113,7 @@ const wchar_t kChromeExe[] = L"chrome.exe"; const wchar_t kChromeOldExe[] = L"old_chrome.exe"; const wchar_t kChromeNewExe[] = L"new_chrome.exe"; const wchar_t kChromeDll[] = L"chrome.dll"; +const wchar_t kChromeFrameDll[] = L"npchrome_tab.dll"; const wchar_t kSetupExe[] = L"setup.exe"; const wchar_t kInstallerDir[] = L"Installer"; diff --git a/chrome/installer/util/util_constants.h b/chrome/installer/util/util_constants.h index d10a585..d781be2 100644 --- a/chrome/installer/util/util_constants.h +++ b/chrome/installer/util/util_constants.h @@ -79,6 +79,7 @@ extern const wchar_t kChromeExe[]; extern const wchar_t kChromeOldExe[]; extern const wchar_t kChromeNewExe[]; extern const wchar_t kChromeDll[]; +extern const wchar_t kChromeFrameDll[]; extern const wchar_t kSetupExe[]; extern const wchar_t kInstallerDir[]; |