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

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 chromeos Created 9 years, 2 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
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/command_line.h" 10 #include "base/command_line.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 142 }
143 143
144 // Check local state for the restart flag so we can restart the session below. 144 // Check local state for the restart flag so we can restart the session below.
145 bool restart_last_session = false; 145 bool restart_last_session = false;
146 if (prefs->HasPrefPath(prefs::kRestartLastSessionOnShutdown)) { 146 if (prefs->HasPrefPath(prefs::kRestartLastSessionOnShutdown)) {
147 restart_last_session = 147 restart_last_session =
148 prefs->GetBoolean(prefs::kRestartLastSessionOnShutdown); 148 prefs->GetBoolean(prefs::kRestartLastSessionOnShutdown);
149 prefs->ClearPref(prefs::kRestartLastSessionOnShutdown); 149 prefs->ClearPref(prefs::kRestartLastSessionOnShutdown);
150 } 150 }
151 151
152 prefs->SavePersistentPrefs(); 152 prefs->CommitPendingWrite();
153 153
154 #if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD) 154 #if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD)
155 // Cleanup any statics created by RLZ. Must be done before NotificationService 155 // Cleanup any statics created by RLZ. Must be done before NotificationService
156 // is destroyed. 156 // is destroyed.
157 RLZTracker::CleanupRlz(); 157 RLZTracker::CleanupRlz();
158 #endif 158 #endif
159 159
160 // The jank'o'meter requires that the browser process has been destroyed 160 // The jank'o'meter requires that the browser process has been destroyed
161 // before calling UninstallJankometer(). 161 // before calling UninstallJankometer().
162 delete g_browser_process; 162 delete g_browser_process;
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 311
312 bool ShuttingDownWithoutClosingBrowsers() { 312 bool ShuttingDownWithoutClosingBrowsers() {
313 #if defined(USE_X11) 313 #if defined(USE_X11)
314 if (GetShutdownType() == browser_shutdown::END_SESSION) 314 if (GetShutdownType() == browser_shutdown::END_SESSION)
315 return true; 315 return true;
316 #endif 316 #endif
317 return false; 317 return false;
318 } 318 }
319 319
320 } // namespace browser_shutdown 320 } // namespace browser_shutdown
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698