summaryrefslogtreecommitdiffstats
path: root/chrome/installer/util/shell_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/shell_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/shell_util.cc')
-rw-r--r--chrome/installer/util/shell_util.cc25
1 files changed, 16 insertions, 9 deletions
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc
index 73aeabe..113b479 100644
--- a/chrome/installer/util/shell_util.cc
+++ b/chrome/installer/util/shell_util.cc
@@ -216,7 +216,9 @@ class RegistryEntry {
string16 delegate_command(ShellUtil::GetChromeDelegateCommand(chrome_exe));
// For user-level installs: entries for the app id and DelegateExecute verb
// handler will be in HKCU; thus we do not need a suffix on those entries.
- string16 app_id(ShellUtil::GetBrowserModelId(dist, chrome_exe));
+ string16 app_id(
+ ShellUtil::GetBrowserModelId(
+ dist, InstallUtil::IsPerUserInstall(chrome_exe.c_str())));
string16 delegate_guid;
// TODO(grt): remove HasDelegateExecuteHandler when the exe is ever-present;
// see also install_worker.cc's AddDelegateExecuteWorkItems.
@@ -752,13 +754,16 @@ void RemoveBadWindows8RegistrationIfNeeded(
!IsChromeMetroSupported())) {
// There's no need to rollback, so forgo the usual work item lists and just
// remove the values from the registry.
- const HKEY root_key = InstallUtil::IsPerUserInstall(chrome_exe.c_str()) ?
- HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE;
+ bool is_per_user_install =
+ InstallUtil::IsPerUserInstall(chrome_exe.c_str());
+ const HKEY root_key = is_per_user_install ? HKEY_CURRENT_USER :
+ HKEY_LOCAL_MACHINE;
// Use the current installation's suffix, not the about-to-be-installed
// suffix.
const string16 installation_suffix(
ShellUtil::GetCurrentInstallationSuffix(dist, chrome_exe));
- const string16 app_id(ShellUtil::GetBrowserModelId(dist, chrome_exe));
+ const string16 app_id(ShellUtil::GetBrowserModelId(dist,
+ is_per_user_install));
// <root hkey>\Software\Classes\<app_id>
string16 key(ShellUtil::kRegClasses);
@@ -1206,11 +1211,10 @@ string16 ShellUtil::GetApplicationName(BrowserDistribution* dist,
}
string16 ShellUtil::GetBrowserModelId(BrowserDistribution* dist,
- const string16& chrome_exe) {
+ bool is_per_user_install) {
string16 app_id(dist->GetBaseAppId());
string16 suffix;
- if (InstallUtil::IsPerUserInstall(chrome_exe.c_str()) &&
- !GetUserSpecificRegistrySuffix(&suffix)) {
+ if (is_per_user_install && !GetUserSpecificRegistrySuffix(&suffix)) {
NOTREACHED();
}
// There is only one component (i.e. the suffixed appid) in this case, but it
@@ -1644,7 +1648,8 @@ void ShellUtil::RemoveChromeStartScreenShortcuts(BrowserDistribution* dist,
}
app_shortcuts_path = app_shortcuts_path.Append(
- GetBrowserModelId(dist, chrome_exe));
+ GetBrowserModelId(dist,
+ InstallUtil::IsPerUserInstall(chrome_exe.c_str())));
if (!file_util::DirectoryExists(app_shortcuts_path)) {
VLOG(1) << "No start screen shortcuts to delete.";
return;
@@ -1675,7 +1680,9 @@ bool ShellUtil::UpdateChromeShortcut(BrowserDistribution* dist,
&icon_index);
}
- const string16 app_id(GetBrowserModelId(dist, chrome_exe));
+ const string16 app_id(
+ GetBrowserModelId(dist,
+ InstallUtil::IsPerUserInstall(chrome_exe.c_str())));
const bool is_dual_mode = ((options & ShellUtil::SHORTCUT_DUAL_MODE) != 0);
const base::win::ShortcutOperation operation =
(options & ShellUtil::SHORTCUT_CREATE_ALWAYS) != 0 ?