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 8897002: Fix an issue where the first profile desktop shortcut gets the correct arguments. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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 | « 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 ShellUtil::GetChromeShortcutName(dist, false, default_name, 248 ShellUtil::GetChromeShortcutName(dist, false, default_name,
249 &new_shortcut)) { 249 &new_shortcut)) {
250 // Update doesn't allow changing the target, so rename first. 250 // Update doesn't allow changing the target, so rename first.
251 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 251 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
252 base::Bind(&RenameChromeDesktopShortcutForProfile, 252 base::Bind(&RenameChromeDesktopShortcutForProfile,
253 old_shortcut, new_shortcut)); 253 old_shortcut, new_shortcut));
254 // TODO(stevet): We actually need to retrieve the newly assigned avatar 254 // TODO(stevet): We actually need to retrieve the newly assigned avatar
255 // icon for the original profile here and update it with that. 255 // icon for the original profile here and update it with that.
256 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 256 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
257 base::Bind(&UpdateChromeDesktopShortcutForProfile, 257 base::Bind(&UpdateChromeDesktopShortcutForProfile,
258 new_shortcut, UTF8ToUTF16(chrome::kInitialProfile), 258 new_shortcut,
259 CreateProfileShortcutSwitch(
260 UTF8ToUTF16(chrome::kInitialProfile)),
259 profile_path, static_cast<gfx::Image*>(NULL))); 261 profile_path, static_cast<gfx::Image*>(NULL)));
260 } 262 }
261 } 263 }
262 } else { // Only one profile, so create original shortcut, with no avatar. 264 } else { // Only one profile, so create original shortcut, with no avatar.
263 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 265 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
264 base::Bind(&CreateChromeDesktopShortcutForProfile, 266 base::Bind(&CreateChromeDesktopShortcutForProfile,
265 L"", L"", FilePath(), static_cast<gfx::Image*>(NULL), true)); 267 L"", L"", FilePath(), static_cast<gfx::Image*>(NULL), true));
266 } 268 }
267 } 269 }
268 270
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 shortcuts.reserve(profile_names.size()); 333 shortcuts.reserve(profile_names.size());
332 for (std::vector<string16>::const_iterator it = profile_names.begin(); 334 for (std::vector<string16>::const_iterator it = profile_names.begin();
333 it != profile_names.end(); 335 it != profile_names.end();
334 ++it) { 336 ++it) {
335 string16 shortcut; 337 string16 shortcut;
336 if (ShellUtil::GetChromeShortcutName(dist, false, *it, &shortcut)) 338 if (ShellUtil::GetChromeShortcutName(dist, false, *it, &shortcut))
337 shortcuts.push_back(shortcut); 339 shortcuts.push_back(shortcut);
338 } 340 }
339 return shortcuts; 341 return shortcuts;
340 } 342 }
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