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

Unified Diff: chrome/browser/prefs/interceptable_pref_filter.h

Issue 329173002: Make a JsonPrefStore readable while mid-interception. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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: chrome/browser/prefs/interceptable_pref_filter.h
diff --git a/chrome/browser/prefs/interceptable_pref_filter.h b/chrome/browser/prefs/interceptable_pref_filter.h
index a1ba00df23d00a625754f7d1e900cfaefc83eee7..f426a15fcd12cffdbfa11ff6a3041003bedd4053 100644
--- a/chrome/browser/prefs/interceptable_pref_filter.h
+++ b/chrome/browser/prefs/interceptable_pref_filter.h
@@ -22,15 +22,14 @@ class InterceptablePrefFilter
// hand back the |prefs| it was handed for early filtering. |prefs_altered|
// indicates whether the |prefs| were actually altered by the
// FilterOnLoadInterceptor before being handed back.
- typedef base::Callback<void(scoped_ptr<base::DictionaryValue> prefs,
- bool prefs_altered)> FinalizeFilterOnLoadCallback;
+ typedef base::Callback<void(bool prefs_altered)> FinalizeFilterOnLoadCallback;
// A callback to be invoked from FilterOnLoad. It takes ownership of prefs
// and may modify them before handing them back to this
// InterceptablePrefFilter via |finalize_filter_on_load|.
typedef base::Callback<
void(const FinalizeFilterOnLoadCallback& finalize_filter_on_load,
- scoped_ptr<base::DictionaryValue> prefs)> FilterOnLoadInterceptor;
+ base::DictionaryValue* prefs)> FilterOnLoadInterceptor;
InterceptablePrefFilter();
virtual ~InterceptablePrefFilter();
@@ -38,7 +37,7 @@ class InterceptablePrefFilter
// PrefFilter partial implementation.
virtual void FilterOnLoad(
const PostFilterOnLoadCallback& post_filter_on_load_callback,
- scoped_ptr<base::DictionaryValue> pref_store_contents) OVERRIDE;
+ base::DictionaryValue* pref_store_contents) OVERRIDE;
// Registers |filter_on_load_interceptor| to intercept the next FilterOnLoad
// event. At most one FilterOnLoadInterceptor should be registered per
@@ -48,11 +47,10 @@ class InterceptablePrefFilter
private:
// Does any extra filtering required by the implementation of this
- // InterceptablePrefFilter and hands back the |pref_store_contents| to the
- // initial caller of FilterOnLoad.
+ // InterceptablePrefFilter and invokes the initial caller of FilterOnLoad.
virtual void FinalizeFilterOnLoad(
const PostFilterOnLoadCallback& post_filter_on_load_callback,
- scoped_ptr<base::DictionaryValue> pref_store_contents,
+ base::DictionaryValue* pref_store_contents,
bool prefs_altered) = 0;
// Callback to be invoked only once (and subsequently reset) on the next

Powered by Google App Engine
This is Rietveld 408576698