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

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

Issue 10837222: Enable EULA dialog to be shown from metro Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Dear Greg, the third. Created 8 years, 3 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.h » ('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 6b327f8e29378b2e05ae102b5d49c9baa01cd3b5..0c1dd99c9315b6989bdb3b4e610eeb0504440252 100644
--- a/chrome/installer/util/install_util.cc
+++ b/chrome/installer/util/install_util.cc
@@ -26,6 +26,7 @@
#include "base/win/windows_version.h"
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/google_update_constants.h"
+#include "chrome/installer/util/helper.h"
#include "chrome/installer/util/l10n_string_util.h"
#include "chrome/installer/util/installation_state.h"
#include "chrome/installer/util/util_constants.h"
@@ -358,6 +359,29 @@ bool InstallUtil::HasDelegateExecuteHandler(BrowserDistribution* dist,
return found;
}
+bool InstallUtil::GetSentinelFilePath(const char* file,
+ BrowserDistribution* dist,
+ FilePath* path) {
+ FilePath exe_path;
+ if (!PathService::Get(base::DIR_EXE, &exe_path))
+ return false;
+
+ if (IsPerUserInstall(exe_path.value().c_str())) {
+ *path = exe_path;
+ } else {
+ std::vector<FilePath> user_data_dir_paths;
+ installer::GetChromeUserDataPaths(dist, &user_data_dir_paths);
+
+ if (!user_data_dir_paths.empty())
+ *path = user_data_dir_paths[0];
+ else
+ return false;
+ }
+
+ *path = path->AppendASCII(file);
+ return true;
+}
+
// This method tries to delete a registry key and logs an error message
// in case of failure. It returns true if deletion is successful (or the key did
// not exist), otherwise false.
« no previous file with comments | « chrome/installer/util/install_util.h ('k') | chrome/installer/util/shell_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698