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

Side by Side Diff: chrome/browser/profiles/profile_shortcut_manager_win.cc

Issue 15255004: Refactor of BrowserDistribution. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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 unified diff | Download patch
OLDNEW
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 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 } 622 }
623 623
624 string16 GetShortcutFilenameForProfile(const string16& profile_name, 624 string16 GetShortcutFilenameForProfile(const string16& profile_name,
625 BrowserDistribution* distribution) { 625 BrowserDistribution* distribution) {
626 string16 shortcut_name; 626 string16 shortcut_name;
627 if (!profile_name.empty()) { 627 if (!profile_name.empty()) {
628 shortcut_name.append(SanitizeShortcutProfileNameString(profile_name)); 628 shortcut_name.append(SanitizeShortcutProfileNameString(profile_name));
629 shortcut_name.append(L" - "); 629 shortcut_name.append(L" - ");
630 shortcut_name.append(l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME)); 630 shortcut_name.append(l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME));
631 } else { 631 } else {
632 shortcut_name.append(distribution->GetAppShortCutName()); 632 shortcut_name.append(
633 distribution->GetShortcutName(BrowserDistribution::SHORTCUT_CHROME));
633 } 634 }
634 return shortcut_name + installer::kLnkExt; 635 return shortcut_name + installer::kLnkExt;
635 } 636 }
636 637
637 string16 CreateProfileShortcutFlags(const base::FilePath& profile_path) { 638 string16 CreateProfileShortcutFlags(const base::FilePath& profile_path) {
638 return base::StringPrintf(L"--%ls=\"%ls\"", 639 return base::StringPrintf(L"--%ls=\"%ls\"",
639 ASCIIToUTF16(switches::kProfileDirectory).c_str(), 640 ASCIIToUTF16(switches::kProfileDirectory).c_str(),
640 profile_path.BaseName().value().c_str()); 641 profile_path.BaseName().value().c_str());
641 } 642 }
642 643
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 profile->GetPath(), 826 profile->GetPath(),
826 base::Bind(&OnProfileIconCreateSuccess, profile->GetPath())); 827 base::Bind(&OnProfileIconCreateSuccess, profile->GetPath()));
827 } 828 }
828 break; 829 break;
829 } 830 }
830 default: 831 default:
831 NOTREACHED(); 832 NOTREACHED();
832 break; 833 break;
833 } 834 }
834 } 835 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc ('k') | chrome/browser/shell_integration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698