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

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

Issue 11573065: Not for check-in. Manually reviewable parts of https://codereview.chromium.org/11570009/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years 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/prefs/pref_service.cc ('k') | chrome/browser/prefs/pref_service_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/pref_service_builder.h
diff --git a/chrome/browser/prefs/pref_service_builder.h b/chrome/browser/prefs/pref_service_builder.h
index a6702b706492d0f61c7697aed7b731321eed3558..d532a06d562f5698df6e486f66cf6e44c4d85a0d 100644
--- a/chrome/browser/prefs/pref_service_builder.h
+++ b/chrome/browser/prefs/pref_service_builder.h
@@ -12,7 +12,6 @@
#include "base/prefs/pref_store.h"
class FilePath;
-class PrefModelAssociator;
class PrefService;
namespace base {
@@ -33,13 +32,8 @@ class PrefServiceBuilder {
PrefServiceBuilder& WithUserPrefs(PersistentPrefStore* store);
PrefServiceBuilder& WithRecommendedPrefs(PrefStore* store);
- // Takes ownership of the associator.
- PrefServiceBuilder& WithSyncAssociator(PrefModelAssociator* associator);
-
- // Sets up callbacks for the PrefService. Do-nothing defaults are
- // provided if these are not called.
- PrefServiceBuilder& WithLocalizedStringMethod(
- const base::Callback<std::string(int)>& localized_string_method);
+ // Sets up error callback for the PrefService. A do-nothing default
+ // is provided if this is not called.
PrefServiceBuilder& WithReadErrorCallback(
const base::Callback<void(PersistentPrefStore::PrefReadError)>&
read_error_callback);
@@ -51,8 +45,9 @@ class PrefServiceBuilder {
PrefServiceBuilder& WithAsync(bool async);
- // Creates the PrefService, invalidating the entire builder configuration.
- virtual PrefService* Create();
+ // Initializes the PrefService object with the builder
+ // configuration. This resets the entire builder configuration.
+ virtual PrefService* Build(PrefService* pref_service);
protected:
scoped_refptr<PrefStore> managed_prefs_;
@@ -61,11 +56,6 @@ class PrefServiceBuilder {
scoped_refptr<PersistentPrefStore> user_prefs_;
scoped_refptr<PrefStore> recommended_prefs_;
- // TODO(joi): Would be nice to switch the various places that deal
- // with this pointer to using scoped_ptr::Pass semantics.
- PrefModelAssociator* sync_associator_;
-
- base::Callback<std::string(int)> get_localized_string_method_;
base::Callback<void(PersistentPrefStore::PrefReadError)> read_error_callback_;
// Defaults to false.
« no previous file with comments | « chrome/browser/prefs/pref_service.cc ('k') | chrome/browser/prefs/pref_service_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698