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

Unified Diff: chrome/browser/profiles/profile_shortcut_manager_win.cc

Issue 9317002: Make the auto-launch experiment profile-aware. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Addressed Miranda's comments, for realz this time Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/options2/browser_options.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_shortcut_manager_win.cc
===================================================================
--- chrome/browser/profiles/profile_shortcut_manager_win.cc (revision 120769)
+++ chrome/browser/profiles/profile_shortcut_manager_win.cc (working copy)
@@ -19,6 +19,7 @@
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
+#include "chrome/installer/util/auto_launch_util.h"
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/shell_util.h"
#include "content/public/browser/browser_thread.h"
@@ -205,6 +206,15 @@
false);
}
+void DeleteAutoLaunchValueForProfile(
+ const FilePath& profile_path) {
+ if (auto_launch_util::WillLaunchAtLogin(FilePath(),
+ profile_path.BaseName().value())) {
+ auto_launch_util::SetWillLaunchAtLogin(
+ false, FilePath(), profile_path.BaseName().value());
+ }
+}
+
} // namespace
ProfileShortcutManagerWin::ProfileShortcutManagerWin() {
@@ -315,6 +325,10 @@
void ProfileShortcutManagerWin::OnProfileWasRemoved(
const FilePath& profile_path,
const string16& profile_name) {
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
+ base::Bind(&DeleteAutoLaunchValueForProfile, profile_path));
+
// If there is one profile left, we want to remove the badge and name from it.
ProfileInfoCache& cache =
g_browser_process->profile_manager()->GetProfileInfoCache();
« no previous file with comments | « no previous file | chrome/browser/resources/options2/browser_options.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698