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

Unified Diff: chrome/browser/session_startup_pref.cc

Issue 1549020: Add a scoped notifier for pref dictionaries / lists. (Closed)
Patch Set: Fix props. Created 10 years, 9 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 | « chrome/browser/scoped_pref_update.cc ('k') | chrome/browser/views/options/general_page_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/session_startup_pref.cc
diff --git a/chrome/browser/session_startup_pref.cc b/chrome/browser/session_startup_pref.cc
index ff919d05429f17addd9faf17ef56f9f187d29373..1da580269259f6a377adf247fa869e17af36bb96 100644
--- a/chrome/browser/session_startup_pref.cc
+++ b/chrome/browser/session_startup_pref.cc
@@ -10,6 +10,7 @@
#include "chrome/browser/defaults.h"
#include "chrome/browser/pref_service.h"
#include "chrome/browser/profile.h"
+#include "chrome/browser/scoped_pref_update.h"
#include "chrome/common/pref_names.h"
namespace {
@@ -64,6 +65,7 @@ void SessionStartupPref::SetStartupPref(PrefService* prefs,
// Always save the URLs, that way the UI can remain consistent even if the
// user changes the startup type pref.
// Ownership of the ListValue retains with the pref service.
+ ScopedPrefUpdate update(prefs, prefs::kURLsToRestoreOnStartup);
ListValue* url_pref_list =
prefs->GetMutableList(prefs::kURLsToRestoreOnStartup);
DCHECK(url_pref_list);
« no previous file with comments | « chrome/browser/scoped_pref_update.cc ('k') | chrome/browser/views/options/general_page_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698