summaryrefslogtreecommitdiffstats
path: root/chrome/installer/util/install_util.cc
diff options
context:
space:
mode:
authorrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-26 14:16:48 +0000
committerrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-26 14:16:48 +0000
commit7867996916cc0ca3d1d89d26c15bb7b39e994419 (patch)
tree89c2fb2fc2f5d41574d70d2fbf1ad93f7a858f1c /chrome/installer/util/install_util.cc
parentd83e5704eeb51d6e9fec081c00a618ad852abe35 (diff)
downloadchromium_src-7867996916cc0ca3d1d89d26c15bb7b39e994419.zip
chromium_src-7867996916cc0ca3d1d89d26c15bb7b39e994419.tar.gz
chromium_src-7867996916cc0ca3d1d89d26c15bb7b39e994419.tar.bz2
Enable EULA dialog to be shown from metro Chrome.
BUG=131033 TEST=Run Chrome in Metro mode while the EULA dialog still needs to be accepted. Get kicked back to the desktop to accept the dialog. On accept, get kicked back into metro mode. Review URL: https://chromiumcodereview.appspot.com/10837222 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158797 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util/install_util.cc')
-rw-r--r--chrome/installer/util/install_util.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc
index 6b327f8..0c1dd99 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.