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

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

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.cc
diff --git a/chrome/browser/prefs/interceptable_pref_filter.cc b/chrome/browser/prefs/interceptable_pref_filter.cc
index b04c07ddf54dbc473290976b15e1544b7b9bb8fd..065ba38d7462c86e3ab8e0b505545fd99d4b7b55 100644
--- a/chrome/browser/prefs/interceptable_pref_filter.cc
+++ b/chrome/browser/prefs/interceptable_pref_filter.cc
@@ -11,11 +11,10 @@ InterceptablePrefFilter::~InterceptablePrefFilter() {}
void InterceptablePrefFilter::FilterOnLoad(
const PostFilterOnLoadCallback& post_filter_on_load_callback,
- scoped_ptr<base::DictionaryValue> pref_store_contents) {
+ base::DictionaryValue* pref_store_contents) {
if (filter_on_load_interceptor_.is_null()) {
- FinalizeFilterOnLoad(post_filter_on_load_callback,
- pref_store_contents.Pass(),
- false);
+ FinalizeFilterOnLoad(
+ post_filter_on_load_callback, pref_store_contents, false);
} else {
// Note, in practice (in the implementation as it was in May 2014) it would
// be okay to pass an unretained |this| pointer below, but in order to avoid
@@ -25,9 +24,10 @@ void InterceptablePrefFilter::FilterOnLoad(
const FinalizeFilterOnLoadCallback finalize_filter_on_load(
base::Bind(&InterceptablePrefFilter::FinalizeFilterOnLoad,
AsWeakPtr(),
- post_filter_on_load_callback));
+ post_filter_on_load_callback,
+ pref_store_contents));
filter_on_load_interceptor_.Run(finalize_filter_on_load,
- pref_store_contents.Pass());
+ pref_store_contents);
filter_on_load_interceptor_.Reset();
}
}

Powered by Google App Engine
This is Rietveld 408576698