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/util/install_util.cc | |
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/util/install_util.cc')
-rw-r--r-- | chrome/installer/util/install_util.cc | 11 |
1 files changed, 10 insertions, 1 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, |