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

Side by Side Diff: chrome/browser/browser_shutdown.cc

Issue 8198007: Remove PrefService::ScheduleSavePersistentPrefs and SavePersistentPrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 12 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/browser_shutdown.h" 5 #include "chrome/browser/browser_shutdown.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 147 }
148 148
149 // Check local state for the restart flag so we can restart the session below. 149 // Check local state for the restart flag so we can restart the session below.
150 bool restart_last_session = false; 150 bool restart_last_session = false;
151 if (prefs->HasPrefPath(prefs::kRestartLastSessionOnShutdown)) { 151 if (prefs->HasPrefPath(prefs::kRestartLastSessionOnShutdown)) {
152 restart_last_session = 152 restart_last_session =
153 prefs->GetBoolean(prefs::kRestartLastSessionOnShutdown); 153 prefs->GetBoolean(prefs::kRestartLastSessionOnShutdown);
154 prefs->ClearPref(prefs::kRestartLastSessionOnShutdown); 154 prefs->ClearPref(prefs::kRestartLastSessionOnShutdown);
155 } 155 }
156 156
157 prefs->SavePersistentPrefs(); 157 prefs->CommitPendingWrite();
158 158
159 #if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD) 159 #if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD)
160 // Cleanup any statics created by RLZ. Must be done before NotificationService 160 // Cleanup any statics created by RLZ. Must be done before NotificationService
161 // is destroyed. 161 // is destroyed.
162 RLZTracker::CleanupRlz(); 162 RLZTracker::CleanupRlz();
163 #endif 163 #endif
164 164
165 return restart_last_session; 165 return restart_last_session;
166 } 166 }
167 167
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 315
316 bool ShuttingDownWithoutClosingBrowsers() { 316 bool ShuttingDownWithoutClosingBrowsers() {
317 return g_shutting_down_without_closing_browsers; 317 return g_shutting_down_without_closing_browsers;
318 } 318 }
319 319
320 void SetShuttingDownWithoutClosingBrowsers(bool without_close) { 320 void SetShuttingDownWithoutClosingBrowsers(bool without_close) {
321 g_shutting_down_without_closing_browsers = without_close; 321 g_shutting_down_without_closing_browsers = without_close;
322 } 322 }
323 323
324 } // namespace browser_shutdown 324 } // namespace browser_shutdown
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698