OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/profiles/profile_shortcut_manager_win.h" | 5 #include "chrome/browser/profiles/profile_shortcut_manager_win.h" |
6 | 6 |
7 #include <shlobj.h> // For SHChangeNotify(). | 7 #include <shlobj.h> // For SHChangeNotify(). |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 | 705 |
706 base::string16 GetShortcutFilenameForProfile( | 706 base::string16 GetShortcutFilenameForProfile( |
707 const base::string16& profile_name, | 707 const base::string16& profile_name, |
708 BrowserDistribution* distribution) { | 708 BrowserDistribution* distribution) { |
709 base::string16 shortcut_name; | 709 base::string16 shortcut_name; |
710 if (!profile_name.empty()) { | 710 if (!profile_name.empty()) { |
711 shortcut_name.append(SanitizeShortcutProfileNameString(profile_name)); | 711 shortcut_name.append(SanitizeShortcutProfileNameString(profile_name)); |
712 shortcut_name.append(L" - "); | 712 shortcut_name.append(L" - "); |
713 shortcut_name.append(l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME)); | 713 shortcut_name.append(l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME)); |
714 } else { | 714 } else { |
715 shortcut_name.append( | 715 shortcut_name.append(distribution->GetShortcutName()); |
716 distribution->GetShortcutName(BrowserDistribution::SHORTCUT_CHROME)); | |
717 } | 716 } |
718 return shortcut_name + installer::kLnkExt; | 717 return shortcut_name + installer::kLnkExt; |
719 } | 718 } |
720 | 719 |
721 base::string16 GetUniqueShortcutFilenameForProfile( | 720 base::string16 GetUniqueShortcutFilenameForProfile( |
722 const base::string16& profile_name, | 721 const base::string16& profile_name, |
723 const std::set<base::FilePath>& excludes, | 722 const std::set<base::FilePath>& excludes, |
724 BrowserDistribution* distribution) { | 723 BrowserDistribution* distribution) { |
725 std::set<base::string16> excludes_names; | 724 std::set<base::string16> excludes_names; |
726 std::transform(excludes.begin(), excludes.end(), | 725 std::transform(excludes.begin(), excludes.end(), |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1019 // Ensure the profile's icon file has been created. | 1018 // Ensure the profile's icon file has been created. |
1020 CreateOrUpdateProfileIcon(profile->GetPath()); | 1019 CreateOrUpdateProfileIcon(profile->GetPath()); |
1021 } | 1020 } |
1022 break; | 1021 break; |
1023 } | 1022 } |
1024 default: | 1023 default: |
1025 NOTREACHED(); | 1024 NOTREACHED(); |
1026 break; | 1025 break; |
1027 } | 1026 } |
1028 } | 1027 } |
OLD | NEW |