Chromium Code Reviews| 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..227c663e9b6d4a6e5b883967fcd37bcd438b4f1a 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)); |
| + // Reset kProfilesLastActive to an empty list to prevent launching the last |
|
sail
2012/01/24 15:09:24
I don't understand why you need to clear this loca
marja
2012/01/24 15:29:34
This is not the code for creating a new profile :)
|
| + // active profiles. |
| + 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 |