Refactor of BrowserDistribution.
This is a precursor to https://codereview.chromium.org/13864015/.
* Added GetStartMenuShortcutSubfolder, which returns the Start Menu
subfolder path for a given subfolder.
* GetShortcutName and GetIconIndex now return data specific to a type
of shortcut (browser, alternate name of browser, or app launcher).
* GetDisplayName is now used rather than GetAppShortcutName where a
localized name is needed (e.g., in logs and the registry).
BUG=233434,238895,161985
Review URL: https://chromiumcodereview.appspot.com/15255004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217469 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc
index cece2f1..d6de8c5c 100644
--- a/chrome/browser/shell_integration_win.cc
+++ b/chrome/browser/shell_integration_win.cc
@@ -361,20 +361,6 @@
GetAppListAppName(), profile_path);
}
-string16 ShellIntegration::GetChromiumIconLocation() {
- // Determine the path to chrome.exe. If we can't determine what that is,
- // we have bigger fish to fry...
- base::FilePath chrome_exe;
- if (!PathService::Get(base::FILE_EXE, &chrome_exe)) {
- NOTREACHED();
- return string16();
- }
-
- return ShellUtil::FormatIconLocation(
- chrome_exe.value(),
- BrowserDistribution::GetDistribution()->GetIconIndex());
-}
-
void ShellIntegration::MigrateChromiumShortcuts() {
if (base::win::GetVersion() < base::win::VERSION_WIN7)
return;
@@ -515,7 +501,8 @@
base::DIR_START_MENU,
};
BrowserDistribution* dist = BrowserDistribution::GetDistribution();
- string16 shortcut_name(dist->GetAppShortCutName());
+ string16 shortcut_name(
+ dist->GetShortcutName(BrowserDistribution::SHORTCUT_CHROME));
base::FilePath shortcut;
// Check both the common and the per-user Start Menu folders for system-level