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

Unified Diff: chrome/installer/util/install_util.cc

Issue 10213010: Don't register or use the DelegateExecute verb handler if it isn't present. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moar logging tweaks Created 8 years, 8 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/installer/util/install_util.h ('k') | chrome/installer/util/shell_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « chrome/installer/util/install_util.h ('k') | chrome/installer/util/shell_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698