diff options
author | hashimoto <hashimoto@chromium.org> | 2015-03-31 21:59:46 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-01 05:00:44 +0000 |
commit | 1e67e2a61a0082ec73f162c8e20eec005c085651 (patch) | |
tree | bb6aa2382a409f3ffb5d969dde96ef98bd19a0c4 /chrome/browser/browser_process_impl.cc | |
parent | c671caeae194614aad733b63a74d9d6c3c7d9c51 (diff) | |
download | chromium_src-1e67e2a61a0082ec73f162c8e20eec005c085651.zip chromium_src-1e67e2a61a0082ec73f162c8e20eec005c085651.tar.gz chromium_src-1e67e2a61a0082ec73f162c8e20eec005c085651.tar.bz2 |
Stop calling PrefService::CommitPendingWrite() in ProfileImpl::SetExitType()
SetExitType() is called by 3 users:
1. ProfileImpl::~ProfileImpl(): PrefService's dtor is responsible to CommitPendingWrite() for Preferences file so there is no need to call it here.
2. chrome::AttemptExit(): Normal shutdown should be performed so there is no need to CommitPendingWrite() here.
3. BrowserProcessImpl::EndSession(): CommitPendingWrite() is added. No behavior change.
BUG=470501
Review URL: https://codereview.chromium.org/1032863002
Cr-Commit-Position: refs/heads/master@{#323186}
Diffstat (limited to 'chrome/browser/browser_process_impl.cc')
-rw-r--r-- | chrome/browser/browser_process_impl.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc index 7b65c6d..b373810 100644 --- a/chrome/browser/browser_process_impl.cc +++ b/chrome/browser/browser_process_impl.cc @@ -469,8 +469,10 @@ void BrowserProcessImpl::EndSession() { for (size_t i = 0; i < profiles.size(); ++i) { Profile* profile = profiles[i]; profile->SetExitType(Profile::EXIT_SESSION_ENDED); - - rundown_counter->Post(profile->GetIOTaskRunner().get()); + if (profile->GetPrefs()) { + profile->GetPrefs()->CommitPendingWrite(); + rundown_counter->Post(profile->GetIOTaskRunner().get()); + } } // Tell the metrics service it was cleanly shutdown. |