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

Side by Side Diff: chrome/browser/prefs/pref_model_associator_client.h

Issue 1305213009: Componentize PrefSyncableService and support classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pref_service_syncable
Patch Set: Add missing dependency on //sync:test_support_sync_api for unit tests with gn Created 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_PREFS_PREF_MODEL_ASSOCIATOR_CLIENT_H_
6 #define CHROME_BROWSER_PREFS_PREF_MODEL_ASSOCIATOR_CLIENT_H_
7
8 #include <string>
9
10 #include "base/macros.h"
11
12 // This class allows the embedder to configure the PrefModelAssociator to
13 // have a different behaviour when receiving preference synchronisations
14 // events from the server.
15 class PrefModelAssociatorClient {
16 public:
17 // Returns true if the preference named |pref_name| is a list preference
18 // whose server value is merged with local value during synchronisation.
19 virtual bool IsMergeableListPreference(
20 const std::string& pref_name) const = 0;
21
22 // Returns true if the preference named |pref_name| is a dictionary preference
23 // whose server value is merged with local value during synchronisation.
24 virtual bool IsMergeableDictionaryPreference(
25 const std::string& pref_name) const = 0;
26
27 // Returns true if the preference named |new_pref_name| is the new name for
28 // an old preference. The old name will be returned via |old_pref_name|.
29 virtual bool IsMigratedPreference(const std::string& new_pref_name,
30 std::string* old_pref_name) const = 0;
31
32 // Returns true if the preference named |old_pref_name| is the new name for
33 // a new preference. The old name will be returned via |new_pref_name|.
34 virtual bool IsOldMigratedPreference(const std::string& old_pref_name,
35 std::string* new_pref_name) const = 0;
36
37 protected:
38 PrefModelAssociatorClient() {}
39 virtual ~PrefModelAssociatorClient() {}
40
41 private:
42 DISALLOW_COPY_AND_ASSIGN(PrefModelAssociatorClient);
43 };
44
45 #endif // CHROME_BROWSER_PREFS_PREF_MODEL_ASSOCIATOR_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/browser/prefs/pref_model_associator.cc ('k') | chrome/browser/prefs/pref_model_associator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698