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

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

Issue 9972012: Resolve the conflict that auto-launch has with the background mode feature (part 1). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 | « no previous file | chrome/browser/ui/browser_init.cc » ('j') | chrome/browser/ui/browser_init.cc » ('J')
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 "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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 shortcut_path.value(), 201 shortcut_path.value(),
202 arguments, 202 arguments,
203 description, 203 description,
204 icon_path.empty() ? chrome_exe.value() : icon_path.value(), 204 icon_path.empty() ? chrome_exe.value() : icon_path.value(),
205 icon_path.empty() ? dist->GetIconIndex() : 0, 205 icon_path.empty() ? dist->GetIconIndex() : 0,
206 ShellUtil::SHORTCUT_NO_OPTIONS); 206 ShellUtil::SHORTCUT_NO_OPTIONS);
207 } 207 }
208 208
209 void DeleteAutoLaunchValueForProfile( 209 void DeleteAutoLaunchValueForProfile(
210 const FilePath& profile_path) { 210 const FilePath& profile_path) {
211 if (auto_launch_util::WillLaunchAtLogin(FilePath(), 211 if (auto_launch_util::WillLaunchAtLoginWithSwitch(
grt (UTC plus 2) 2012/04/16 19:43:58 can you do away with the "WithSwitch" part of this
212 profile_path.BaseName().value())) { 212 FilePath(),
213 auto_launch_util::SetWillLaunchAtLogin( 213 profile_path.BaseName().value(),
214 false, FilePath(), profile_path.BaseName().value()); 214 switches::kAutoLaunchAtStartup)) {
215 auto_launch_util::DisableAutoStartAtLogin(profile_path.BaseName().value());
215 } 216 }
216 } 217 }
217 218
218 } // namespace 219 } // namespace
219 220
220 ProfileShortcutManagerWin::ProfileShortcutManagerWin() { 221 ProfileShortcutManagerWin::ProfileShortcutManagerWin() {
221 } 222 }
222 223
223 ProfileShortcutManagerWin::~ProfileShortcutManagerWin() { 224 ProfileShortcutManagerWin::~ProfileShortcutManagerWin() {
224 } 225 }
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 shortcuts.reserve(profile_names.size()); 422 shortcuts.reserve(profile_names.size());
422 for (std::vector<string16>::const_iterator it = profile_names.begin(); 423 for (std::vector<string16>::const_iterator it = profile_names.begin();
423 it != profile_names.end(); 424 it != profile_names.end();
424 ++it) { 425 ++it) {
425 string16 shortcut; 426 string16 shortcut;
426 if (ShellUtil::GetChromeShortcutName(dist, false, *it, &shortcut)) 427 if (ShellUtil::GetChromeShortcutName(dist, false, *it, &shortcut))
427 shortcuts.push_back(shortcut); 428 shortcuts.push_back(shortcut);
428 } 429 }
429 return shortcuts; 430 return shortcuts;
430 } 431 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/browser_init.cc » ('j') | chrome/browser/ui/browser_init.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698