| 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  |    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  Loading... | 
|  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  Loading... | 
|  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 } | 
| OLD | NEW |