Index: chrome/installer/util/install_util.cc |
diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc |
index a8e2d0e44eb17f7c85224ca6608aa2b59d3fd22f..1ea87851997a83f1ede64130f1a2228996e2461e 100644 |
--- a/chrome/installer/util/install_util.cc |
+++ b/chrome/installer/util/install_util.cc |
@@ -14,6 +14,7 @@ |
#include <algorithm> |
#include "base/command_line.h" |
+#include "base/file_util.h" |
#include "base/logging.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/path_service.h" |
@@ -338,6 +339,24 @@ bool InstallUtil::IsChromeSxSProcess() { |
return sxs; |
} |
+bool InstallUtil::HasDelegateExecuteHandler(BrowserDistribution* dist, |
+ const string16& chrome_exe) { |
+ bool found = false; |
+ bool system_install = !IsPerUserInstall(chrome_exe.c_str()); |
+ scoped_ptr<Version> version(GetChromeVersion(dist, system_install)); |
+ if (!version.get()) { |
+ LOG(ERROR) << __FUNCTION__ << " failed to determine version of " |
+ << dist->GetAppShortCutName() << " installed at " << chrome_exe; |
+ } else { |
+ FilePath handler( |
+ FilePath(chrome_exe).DirName() |
+ .AppendASCII(version->GetString()) |
+ .Append(installer::kDelegateExecuteExe)); |
+ found = file_util::PathExists(handler); |
+ } |
+ return found; |
+} |
+ |
// This method tries to delete a registry key and logs an error message |
// in case of failure. It returns true if deletion is successful, |
// otherwise false. |