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

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

Issue 1926403002: Remove BrowserDistribution::SHORTCUT_APP_LAUNCHER (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20160406-Mac-EnableAppLauncher0
Patch Set: lint headers Created 4 years, 7 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/shell_util.h ('k') | chrome/installer/util/shell_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/shell_util.cc
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc
index 416d0a07bbf413d9b814495079c0dd79cf9caf29..d4dc85ec43b5d85219e037434cafaa3e1d766515 100644
--- a/chrome/installer/util/shell_util.cc
+++ b/chrome/installer/util/shell_util.cc
@@ -350,8 +350,7 @@ void GetChromeProgIdEntries(BrowserDistribution* dist,
const base::FilePath& chrome_exe,
const base::string16& suffix,
ScopedVector<RegistryEntry>* entries) {
- int chrome_icon_index =
- dist->GetIconIndex(BrowserDistribution::SHORTCUT_CHROME);
+ int chrome_icon_index = dist->GetIconIndex();
ApplicationInfo app_info;
app_info.prog_id = GetBrowserProgId(suffix);
@@ -412,8 +411,8 @@ void GetShellIntegrationEntries(BrowserDistribution* dist,
const base::FilePath& chrome_exe,
const base::string16& suffix,
ScopedVector<RegistryEntry>* entries) {
- const base::string16 icon_path(ShellUtil::FormatIconLocation(
- chrome_exe, dist->GetIconIndex(BrowserDistribution::SHORTCUT_CHROME)));
+ const base::string16 icon_path(
+ ShellUtil::FormatIconLocation(chrome_exe, dist->GetIconIndex()));
const base::string16 quoted_exe_path(L"\"" + chrome_exe.value() + L"\"");
// Register for the Start Menu "Internet" link (pre-Win7).
@@ -600,8 +599,8 @@ void GetXPStyleDefaultBrowserUserEntries(BrowserDistribution* dist,
// Protocols associations.
base::string16 chrome_open = ShellUtil::GetChromeShellOpenCmd(chrome_exe);
- base::string16 chrome_icon = ShellUtil::FormatIconLocation(
- chrome_exe, dist->GetIconIndex(BrowserDistribution::SHORTCUT_CHROME));
+ base::string16 chrome_icon =
+ ShellUtil::FormatIconLocation(chrome_exe, dist->GetIconIndex());
for (int i = 0; ShellUtil::kBrowserProtocolAssociations[i] != NULL; i++) {
GetXPStyleUserProtocolEntries(ShellUtil::kBrowserProtocolAssociations[i],
chrome_icon, chrome_open, entries);
@@ -919,9 +918,7 @@ bool RegisterChromeAsDefaultProtocolClientXPStyle(
const base::string16 chrome_open(
ShellUtil::GetChromeShellOpenCmd(chrome_exe));
const base::string16 chrome_icon(
- ShellUtil::FormatIconLocation(
- chrome_exe,
- dist->GetIconIndex(BrowserDistribution::SHORTCUT_CHROME)));
+ ShellUtil::FormatIconLocation(chrome_exe, dist->GetIconIndex()));
GetXPStyleUserProtocolEntries(protocol, chrome_icon, chrome_open, &entries);
// Change the default protocol handler for current user.
if (!ShellUtil::AddRegistryEntries(HKEY_CURRENT_USER, entries)) {
@@ -933,19 +930,15 @@ bool RegisterChromeAsDefaultProtocolClientXPStyle(
}
// Returns |properties.shortcut_name| if the property is set, otherwise it
-// returns dist->GetShortcutName(BrowserDistribution::SHORTCUT_CHROME). In any
-// case, it makes sure the return value is suffixed with ".lnk".
+// returns dist->GetShortcutName(). In any case, it makes sure the return value
+// is suffixed with ".lnk".
base::string16 ExtractShortcutNameFromProperties(
BrowserDistribution* dist,
const ShellUtil::ShortcutProperties& properties) {
DCHECK(dist);
- base::string16 shortcut_name;
- if (properties.has_shortcut_name()) {
- shortcut_name = properties.shortcut_name;
- } else {
- shortcut_name =
- dist->GetShortcutName(BrowserDistribution::SHORTCUT_CHROME);
- }
+ base::string16 shortcut_name = properties.has_shortcut_name()
+ ? properties.shortcut_name
+ : dist->GetShortcutName();
if (!base::EndsWith(shortcut_name, installer::kLnkExt,
base::CompareCase::INSENSITIVE_ASCII))
« no previous file with comments | « chrome/installer/util/shell_util.h ('k') | chrome/installer/util/shell_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698