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

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: Fix: launch profiles which would open a predefined set of tabs. 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..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
« 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