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 |