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

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

Issue 11743022: Windows: Remove desktop profile shortcuts (and any others pointing to the exe) on uninstall. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chrome_browser_main_win.cc ('k') | chrome/installer/setup/install.cc » ('j') | 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 <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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main_win.cc ('k') | chrome/installer/setup/install.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698