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

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

Issue 17993005: Enable profile shortcut manager for windows when --show-app-list switch is enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 ASCIIToUTF16(switches::kProfileDirectory).c_str(), 550 ASCIIToUTF16(switches::kProfileDirectory).c_str(),
551 profile_path.BaseName().value().c_str()); 551 profile_path.BaseName().value().c_str());
552 } 552 }
553 553
554 } // namespace internal 554 } // namespace internal
555 } // namespace profiles 555 } // namespace profiles
556 556
557 // static 557 // static
558 bool ProfileShortcutManager::IsFeatureEnabled() { 558 bool ProfileShortcutManager::IsFeatureEnabled() {
559 return BrowserDistribution::GetDistribution()->CanCreateDesktopShortcuts() && 559 return BrowserDistribution::GetDistribution()->CanCreateDesktopShortcuts() &&
560 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kUserDataDir) && 560 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kUserDataDir);
561 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kShowAppList);
562 } 561 }
563 562
564 // static 563 // static
565 ProfileShortcutManager* ProfileShortcutManager::Create( 564 ProfileShortcutManager* ProfileShortcutManager::Create(
566 ProfileManager* manager) { 565 ProfileManager* manager) {
567 return new ProfileShortcutManagerWin(manager); 566 return new ProfileShortcutManagerWin(manager);
568 } 567 }
569 568
570 ProfileShortcutManagerWin::ProfileShortcutManagerWin(ProfileManager* manager) 569 ProfileShortcutManagerWin::ProfileShortcutManagerWin(ProfileManager* manager)
571 : profile_manager_(manager) { 570 : profile_manager_(manager) {
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 BrowserThread::PostTask( 696 BrowserThread::PostTask(
698 BrowserThread::FILE, FROM_HERE, 697 BrowserThread::FILE, FROM_HERE,
699 base::Bind(&CreateOrUpdateDesktopShortcutsForProfile, profile_path, 698 base::Bind(&CreateOrUpdateDesktopShortcutsForProfile, profile_path,
700 old_shortcut_appended_name, new_shortcut_appended_name, 699 old_shortcut_appended_name, new_shortcut_appended_name,
701 avatar_bitmap_copy_1x, avatar_bitmap_copy_2x, create_mode, 700 avatar_bitmap_copy_1x, avatar_bitmap_copy_2x, create_mode,
702 action)); 701 action));
703 702
704 cache->SetShortcutNameOfProfileAtIndex(profile_index, 703 cache->SetShortcutNameOfProfileAtIndex(profile_index,
705 new_shortcut_appended_name); 704 new_shortcut_appended_name);
706 } 705 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698