summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/chromium_strings.grd3
-rw-r--r--chrome/app/generated_resources.grd3
-rw-r--r--chrome/app/google_chrome_strings.grd3
-rw-r--r--chrome/browser/app_icon_win.cc2
-rw-r--r--chrome/browser/user_data_manager.cc9
-rw-r--r--chrome/installer/util/browser_distribution.cc4
-rw-r--r--chrome/installer/util/browser_distribution.h2
-rw-r--r--chrome/installer/util/google_chrome_sxs_distribution.cc5
-rw-r--r--chrome/installer/util/google_chrome_sxs_distribution.h2
-rw-r--r--chrome/installer/util/shell_util.cc9
10 files changed, 19 insertions, 23 deletions
diff --git a/chrome/app/chromium_strings.grd b/chrome/app/chromium_strings.grd
index 9aafc83..96cf50a 100644
--- a/chrome/app/chromium_strings.grd
+++ b/chrome/app/chromium_strings.grd
@@ -381,9 +381,6 @@ be available for now. -->
<message name="IDS_IMPORT_BOOKMARKS" desc="Explanatory text for the importing progress dialog when importing a bookmarks.html file from the bookmark manager">
Chromium is now importing Favorites/Bookmarks.
</message>
- <message name="IDS_START_IN_PROFILE_SHORTCUT_NAME" desc="Name of the desktop shortcut to start the application in a specific profile.">
- Chromium for <ph name="profile_name">$1</ph>
- </message>
<message name="IDS_OEM_MAIN_SHORTCUT_NAME" desc="Name of the desktop shortcut to start the application for OEM pre-installations.">
Internet Browser
</message>
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index acebc64..b2eef6e 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -6449,6 +6449,9 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_SELECT_PROFILE_DIALOG_NEW_PROFILE_ENTRY" desc="Text for an extra entry in the profiles combo box. The user can select this entry to create a new profile.">
&lt;New Profile&gt;...
</message>
+ <message name="IDS_START_IN_PROFILE_SHORTCUT_NAME" desc="Name of the desktop shortcut to start the application in a specific profile.">
+ <ph name="app_name">$1<ex>Google Chrome</ex></ph> for <ph name="profile_name">$2<ex>My Second Profile</ex></ph>
+ </message>
<!-- User data directory new profile dialog -->
<message name="IDS_NEW_PROFILE_DIALOG_TITLE" desc="Title of dialog that lets the user enter a new profile name to open new window.">
diff --git a/chrome/app/google_chrome_strings.grd b/chrome/app/google_chrome_strings.grd
index b789dda0..a4e5656 100644
--- a/chrome/app/google_chrome_strings.grd
+++ b/chrome/app/google_chrome_strings.grd
@@ -431,9 +431,6 @@ Chrome supports. -->
<message name="IDS_IMPORT_BOOKMARKS" desc="Explanatory text for the importing progress dialog when importing a bookmarks.html file from the bookmark manager">
Google Chrome is now importing Favorites/Bookmarks.
</message>
- <message name="IDS_START_IN_PROFILE_SHORTCUT_NAME" desc="Name of the desktop shortcut to start the application in a specific profile.">
- Google Chrome for <ph name="profile_name">$1</ph>
- </message>
<message name="IDS_OEM_MAIN_SHORTCUT_NAME" desc="Name of the desktop shortcut to start the application for OEM pre-installations.">
Internet Browser
</message>
diff --git a/chrome/browser/app_icon_win.cc b/chrome/browser/app_icon_win.cc
index 9d5cdc2..bd18aaa 100644
--- a/chrome/browser/app_icon_win.cc
+++ b/chrome/browser/app_icon_win.cc
@@ -14,7 +14,7 @@
HICON GetAppIcon() {
int icon_id = IDR_MAINFRAME;
#if defined(GOOGLE_CHROME_BUILD)
- if (BrowserDistribution::GetDistribution()->ShouldUseAlternateIcon())
+ if (BrowserDistribution::GetDistribution()->GetIconIndex())
icon_id = IDR_SXS;
#endif
return LoadIcon(GetModuleHandle(chrome::kBrowserResourcesDll),
diff --git a/chrome/browser/user_data_manager.cc b/chrome/browser/user_data_manager.cc
index b299ffa..ec35b19 100644
--- a/chrome/browser/user_data_manager.cc
+++ b/chrome/browser/user_data_manager.cc
@@ -20,12 +20,12 @@
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
-#include "chrome/installer/util/browser_distribution.h"
-#include "grit/chromium_strings.h"
+#include "grit/generated_resources.h"
#if defined(OS_WIN)
#include <windows.h>
#include "chrome/browser/shell_integration.h"
+#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/shell_util.h"
#endif
@@ -262,6 +262,8 @@ bool UserDataManager::CreateShortcutForProfileInFolder(
if (!PathService::Get(base::FILE_EXE, &exe_path))
return false;
+ BrowserDistribution* dist = BrowserDistribution::GetDistribution();
+
// Working directory.
FilePath exe_folder = exe_path.DirName();
@@ -277,6 +279,7 @@ bool UserDataManager::CreateShortcutForProfileInFolder(
// Shortcut path.
std::wstring shortcut_name = l10n_util::GetStringF(
IDS_START_IN_PROFILE_SHORTCUT_NAME,
+ dist->GetAppShortCutName(),
profile_name);
shortcut_name.append(L".lnk");
FilePath shortcut_path = folder.Append(shortcut_name);
@@ -292,7 +295,7 @@ bool UserDataManager::CreateShortcutForProfileInFolder(
args.c_str(),
NULL,
exe_path.value().c_str(),
- 0,
+ dist->GetIconIndex(),
ShellIntegration::GetChromiumAppId(profile_path).c_str());
#else
// TODO(port): should probably use freedesktop.org standard for desktop files.
diff --git a/chrome/installer/util/browser_distribution.cc b/chrome/installer/util/browser_distribution.cc
index 9f53be3..da35d7a 100644
--- a/chrome/installer/util/browser_distribution.cc
+++ b/chrome/installer/util/browser_distribution.cc
@@ -142,8 +142,8 @@ bool BrowserDistribution::CanSetAsDefault() {
return true;
}
-bool BrowserDistribution::ShouldUseAlternateIcon() {
- return false;
+int BrowserDistribution::GetIconIndex() {
+ return 0;
}
bool BrowserDistribution::GetChromeChannel(std::wstring* channel) {
diff --git a/chrome/installer/util/browser_distribution.h b/chrome/installer/util/browser_distribution.h
index dd271d8..c9be526 100644
--- a/chrome/installer/util/browser_distribution.h
+++ b/chrome/installer/util/browser_distribution.h
@@ -62,7 +62,7 @@ class BrowserDistribution {
virtual bool CanSetAsDefault();
- virtual bool ShouldUseAlternateIcon();
+ virtual int GetIconIndex();
virtual bool GetChromeChannel(std::wstring* channel);
diff --git a/chrome/installer/util/google_chrome_sxs_distribution.cc b/chrome/installer/util/google_chrome_sxs_distribution.cc
index 6807e93..6493ff9 100644
--- a/chrome/installer/util/google_chrome_sxs_distribution.cc
+++ b/chrome/installer/util/google_chrome_sxs_distribution.cc
@@ -12,6 +12,7 @@ namespace {
const wchar_t kChromeSxSGuid[] = L"{4ea16ac7-fd5a-47c3-875b-dbf4a2008c20}";
const wchar_t kChannelName[] = L"SxS";
+const int kSxSIconIndex = 4;
} // namespace
@@ -43,8 +44,8 @@ bool GoogleChromeSxSDistribution::CanSetAsDefault() {
return false;
}
-bool GoogleChromeSxSDistribution::ShouldUseAlternateIcon() {
- return true;
+int GoogleChromeSxSDistribution::GetIconIndex() {
+ return kSxSIconIndex;
}
bool GoogleChromeSxSDistribution::GetChromeChannel(std::wstring* channel) {
diff --git a/chrome/installer/util/google_chrome_sxs_distribution.h b/chrome/installer/util/google_chrome_sxs_distribution.h
index 3062f43..0e8ce49 100644
--- a/chrome/installer/util/google_chrome_sxs_distribution.h
+++ b/chrome/installer/util/google_chrome_sxs_distribution.h
@@ -24,7 +24,7 @@ class GoogleChromeSxSDistribution : public GoogleChromeDistribution {
virtual std::wstring GetUninstallRegPath();
virtual std::wstring GetEnvVersionKey();
virtual bool CanSetAsDefault();
- virtual bool ShouldUseAlternateIcon();
+ virtual int GetIconIndex();
virtual bool GetChromeChannel(std::wstring* channel);
// returns the channel name for GoogleChromeSxSDistribution
static std::wstring ChannelName();
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc
index e3c86f0..561f2e9 100644
--- a/chrome/installer/util/shell_util.cc
+++ b/chrome/installer/util/shell_util.cc
@@ -31,9 +31,6 @@
namespace {
-const int kDefaultIconIndex = 0;
-const int kSxSIconIndex = 4;
-
// This class represents a single registry entry. The objective is to
// encapsulate all the registry entries required for registering Chrome at one
// place. This class can not be instantiated outside the class and the objects
@@ -505,8 +502,7 @@ std::wstring ShellUtil::GetChromeIcon(const std::wstring& chrome_exe) {
BrowserDistribution* dist = BrowserDistribution::GetDistribution();
std::wstring chrome_icon(chrome_exe);
chrome_icon.append(L",");
- chrome_icon.append(IntToWString(dist->ShouldUseAlternateIcon() ?
- kSxSIconIndex : kDefaultIconIndex));
+ chrome_icon.append(IntToWString(dist->GetIconIndex()));
return chrome_icon;
}
@@ -777,8 +773,7 @@ bool ShellUtil::UpdateChromeShortcut(const std::wstring& chrome_exe,
prefs_path = prefs_path.AppendASCII(installer_util::kDefaultMasterPrefs);
scoped_ptr<DictionaryValue> prefs(
installer_util::ParseDistributionPreferences(prefs_path));
- int icon_index = dist->ShouldUseAlternateIcon() ?
- kSxSIconIndex : kDefaultIconIndex;
+ int icon_index = dist->GetIconIndex();
installer_util::GetDistroIntegerPreference(prefs.get(),
installer_util::master_preferences::kChromeShortcutIconIndex,
&icon_index);