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 <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 profiles::internal::CreateProfileShortcutFlags(profile_path); | 261 profiles::internal::CreateProfileShortcutFlags(profile_path); |
262 std::vector<FilePath> shortcuts; | 262 std::vector<FilePath> shortcuts; |
263 ListDesktopShortcutsWithCommandLine(chrome_exe, command_line, false, | 263 ListDesktopShortcutsWithCommandLine(chrome_exe, command_line, false, |
264 &shortcuts); | 264 &shortcuts); |
265 | 265 |
266 BrowserDistribution* distribution = BrowserDistribution::GetDistribution(); | 266 BrowserDistribution* distribution = BrowserDistribution::GetDistribution(); |
267 for (size_t i = 0; i < shortcuts.size(); ++i) { | 267 for (size_t i = 0; i < shortcuts.size(); ++i) { |
268 const string16 shortcut_name = | 268 const string16 shortcut_name = |
269 shortcuts[i].BaseName().RemoveExtension().value(); | 269 shortcuts[i].BaseName().RemoveExtension().value(); |
270 ShellUtil::RemoveShortcut(ShellUtil::SHORTCUT_LOCATION_DESKTOP, | 270 ShellUtil::RemoveShortcut(ShellUtil::SHORTCUT_LOCATION_DESKTOP, |
271 distribution, chrome_exe.value(), | 271 distribution, chrome_exe, ShellUtil::CURRENT_USER, |
272 ShellUtil::CURRENT_USER, | |
273 &shortcut_name); | 272 &shortcut_name); |
274 } | 273 } |
275 | 274 |
276 file_util::Delete(icon_path, false); | 275 file_util::Delete(icon_path, false); |
277 } | 276 } |
278 | 277 |
279 } // namespace | 278 } // namespace |
280 | 279 |
281 namespace profiles { | 280 namespace profiles { |
282 namespace internal { | 281 namespace internal { |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 } | 456 } |
458 BrowserThread::PostTask( | 457 BrowserThread::PostTask( |
459 BrowserThread::FILE, FROM_HERE, | 458 BrowserThread::FILE, FROM_HERE, |
460 base::Bind(&CreateOrUpdateDesktopShortcutsForProfile, | 459 base::Bind(&CreateOrUpdateDesktopShortcutsForProfile, |
461 profile_path, new_shortcut_appended_name, | 460 profile_path, new_shortcut_appended_name, |
462 profile_avatar_bitmap_copy, create_mode, action)); | 461 profile_avatar_bitmap_copy, create_mode, action)); |
463 | 462 |
464 cache->SetShortcutNameOfProfileAtIndex(profile_index, | 463 cache->SetShortcutNameOfProfileAtIndex(profile_index, |
465 new_shortcut_appended_name); | 464 new_shortcut_appended_name); |
466 } | 465 } |
OLD | NEW |