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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 9117024: Changes to "launch with multiple profiles" behavior. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/browser_init.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 1f4649694e7b3bb1e7a973557f85fdbbef6be1cd..75bf421309379b4878bacc5934097085545f4fe3 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -61,6 +61,7 @@
#include "chrome/browser/policy/browser_policy_connector.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/prefs/pref_value_store.h"
+#include "chrome/browser/prefs/scoped_user_pref_update.h"
#include "chrome/browser/prerender/prerender_field_trial.h"
#include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
#include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.h"
@@ -392,6 +393,12 @@ Profile* CreateProfile(const content::MainFunctionParams& parameters,
g_browser_process->local_state()->SetString(prefs::kProfileLastUsed,
parsed_command_line.GetSwitchValueASCII(
switches::kProfileDirectory));
+ // Clear kProfilesLastActive since the user only wants to launch a specific
+ // profile.
+ ListPrefUpdate update(g_browser_process->local_state(),
+ prefs::kProfilesLastActive);
+ ListValue* profile_list = update.Get();
+ profile_list->Clear();
}
#if defined(OS_CHROMEOS)
// TODO(ivankr): http://crbug.com/83792
« no previous file with comments | « no previous file | chrome/browser/ui/browser_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698