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

Unified Diff: base/prefs/pref_service.cc

Issue 511393003: No longer register app window placement preference keys on the fly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make member variables local Created 6 years, 3 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
Index: base/prefs/pref_service.cc
diff --git a/base/prefs/pref_service.cc b/base/prefs/pref_service.cc
index 65605c5f8e6d346f1d10f82b3a1dc76b08e989a9..b0a70e04a2a64cf4a42fba294aa37e74051f1c1e 100644
--- a/base/prefs/pref_service.cc
+++ b/base/prefs/pref_service.cc
@@ -554,3 +554,15 @@ const base::Value* PrefService::GetPreferenceValue(
return NULL;
}
+
+scoped_ptr<base::DictionaryValue> PrefService::GetBrowserDictionary() const {
+ const base::Value* browser_value = NULL;
dgrogan 2014/09/04 00:50:51 The other accessor methods use pref_registry to ge
+ if (!user_pref_store_->GetValue("browser", &browser_value))
+ return scoped_ptr<base::DictionaryValue>();
+ const base::DictionaryValue* browser_dict = NULL;
+ if (!browser_value->GetAsDictionary(&browser_dict)) {
+ NOTREACHED();
Bernhard Bauer 2014/09/04 11:06:02 Using NOTREACHED() to handle the result of a check
dgrogan 2014/09/04 20:26:32 Removed the NOTREACHED since it is possible that s
+ return scoped_ptr<base::DictionaryValue>();
+ }
+ return make_scoped_ptr(browser_dict->DeepCopy());
+}

Powered by Google App Engine
This is Rietveld 408576698