From b8b600842f1999c19eba512bbb8b022f74490187 Mon Sep 17 00:00:00 2001 From: "marja@chromium.org" Date: Tue, 13 Dec 2011 14:16:02 +0000 Subject: Fixes for the kWasRestarted pref. Reset the kWasRestarted pref upon successful restart. Set it only when restarting. Write the persistent preferences after setting it. The preference was introduced in http://codereview.chromium.org/8745015. BUG=106948 TEST=see bug Review URL: http://codereview.chromium.org/8937001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114213 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/profiles/profile_impl.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'chrome/browser/profiles') diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc index 5088f3c..6574cd7 100644 --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc @@ -78,6 +78,7 @@ #include "chrome/browser/sync/profile_sync_service.h" #include "chrome/browser/tabs/pinned_tab_service_factory.h" #include "chrome/browser/transport_security_persister.h" +#include "chrome/browser/ui/browser_init.h" #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/find_bar/find_bar_state.h" #include "chrome/browser/ui/webui/chrome_url_data_manager.h" @@ -378,7 +379,7 @@ void ProfileImpl::DoFinalInit() { (!DidLastSessionExitCleanly() || CommandLine::ForCurrentProcess()->HasSwitch( switches::kRestoreLastSession) || - local_state->GetBoolean(prefs::kWasRestarted)); + BrowserInit::WasRestarted()); // Make sure we initialize the ProfileIOData after everything else has been // initialized that we might be reading from the IO thread. -- cgit v1.1