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

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

Issue 12570009: Disable ProfileShortcutManager for App Launcher (chrome.exe --show-app-list) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 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 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 ASCIIToUTF16(switches::kProfileDirectory).c_str(), 528 ASCIIToUTF16(switches::kProfileDirectory).c_str(),
529 profile_path.BaseName().value().c_str()); 529 profile_path.BaseName().value().c_str());
530 } 530 }
531 531
532 } // namespace internal 532 } // namespace internal
533 } // namespace profiles 533 } // namespace profiles
534 534
535 // static 535 // static
536 bool ProfileShortcutManager::IsFeatureEnabled() { 536 bool ProfileShortcutManager::IsFeatureEnabled() {
537 return BrowserDistribution::GetDistribution()->CanCreateDesktopShortcuts() && 537 return BrowserDistribution::GetDistribution()->CanCreateDesktopShortcuts() &&
538 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kUserDataDir); 538 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kUserDataDir) &&
539 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kShowAppList);
539 } 540 }
540 541
541 // static 542 // static
542 ProfileShortcutManager* ProfileShortcutManager::Create( 543 ProfileShortcutManager* ProfileShortcutManager::Create(
543 ProfileManager* manager) { 544 ProfileManager* manager) {
544 return new ProfileShortcutManagerWin(manager); 545 return new ProfileShortcutManagerWin(manager);
545 } 546 }
546 547
547 ProfileShortcutManagerWin::ProfileShortcutManagerWin(ProfileManager* manager) 548 ProfileShortcutManagerWin::ProfileShortcutManagerWin(ProfileManager* manager)
548 : profile_manager_(manager) { 549 : profile_manager_(manager) {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 BrowserThread::PostTask( 683 BrowserThread::PostTask(
683 BrowserThread::FILE, FROM_HERE, 684 BrowserThread::FILE, FROM_HERE,
684 base::Bind(&CreateOrUpdateDesktopShortcutsForProfile, profile_path, 685 base::Bind(&CreateOrUpdateDesktopShortcutsForProfile, profile_path,
685 old_shortcut_appended_name, new_shortcut_appended_name, 686 old_shortcut_appended_name, new_shortcut_appended_name,
686 avatar_bitmap_copy_1x, avatar_bitmap_copy_2x, create_mode, 687 avatar_bitmap_copy_1x, avatar_bitmap_copy_2x, create_mode,
687 action)); 688 action));
688 689
689 cache->SetShortcutNameOfProfileAtIndex(profile_index, 690 cache->SetShortcutNameOfProfileAtIndex(profile_index,
690 new_shortcut_appended_name); 691 new_shortcut_appended_name);
691 } 692 }
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