Chromium Code Reviews| Index: base/prefs/pref_filter.h |
| diff --git a/base/prefs/pref_filter.h b/base/prefs/pref_filter.h |
| index 1020029131ab3daaec1f3abbfa322781915d9abf..d3fc8f1b7681b1c167c22f65e5bab11cf9f8c283 100644 |
| --- a/base/prefs/pref_filter.h |
| +++ b/base/prefs/pref_filter.h |
| @@ -20,25 +20,26 @@ class Value; |
| // Currently supported only by JsonPrefStore. |
| class BASE_PREFS_EXPORT PrefFilter { |
| public: |
| - // A callback to be invoked when |prefs| have been read (and possibly |
| + // A callback to be invoked when prefs have been read (and possibly |
| // pre-modified) and are now ready to be handed back to this callback's |
| // builder. |schedule_write| indicates whether a write should be immediately |
| - // scheduled (typically because the |prefs| were pre-modified). |
| - typedef base::Callback<void(scoped_ptr<base::DictionaryValue> prefs, |
| - bool schedule_write)> PostFilterOnLoadCallback; |
| + // scheduled (typically because the prefs were pre-modified). |
| + typedef base::Callback<void(bool schedule_write)> PostFilterOnLoadCallback; |
| virtual ~PrefFilter() {} |
| - // This method is given ownership of the |pref_store_contents| read from disk |
| - // before the underlying PersistentPrefStore gets to use them. It must hand |
| - // them back via |post_filter_on_load_callback|, but may modify them first. |
| + // This method is given a reference to the |pref_store_contents| read from |
| + // disk |
|
gab
2014/06/11 21:12:55
nit: fix early line break
|
| + // before other observers and clients of the PersistentPrefStore use them. It |
| + // must eventually call |post_filter_on_load_callback|, but may modify the |
| + // prefs first. |
| // Note: This method is asynchronous, which may make calls like |
| // PersistentPrefStore::ReadPrefs() asynchronous. The owner of filtered |
| // PersistentPrefStores should handle this to make the reads look synchronous |
| // to external users (see SegregatedPrefStore::ReadPrefs() for an example). |
| virtual void FilterOnLoad( |
| const PostFilterOnLoadCallback& post_filter_on_load_callback, |
| - scoped_ptr<base::DictionaryValue> pref_store_contents) = 0; |
| + base::DictionaryValue* pref_store_contents) = 0; |
| // Receives notification when a pref store value is changed, before Observers |
| // are notified. |