Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / ios / chrome / browser / prefs / ios_chrome_pref_model_associator_client.h
blobb4ba80d58fa0101698313cc37cf67f6a685b919f
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.
5 #ifndef IOS_CHROME_BROWSER_PREFS_IOS_CHROME_PREF_MODEL_ASSOCIATOR_CLIENT_H_
6 #define IOS_CHROME_BROWSER_PREFS_IOS_CHROME_PREF_MODEL_ASSOCIATOR_CLIENT_H_
8 #include <string>
10 #include "base/macros.h"
11 #include "components/syncable_prefs/pref_model_associator_client.h"
13 namespace base {
14 template <typename T>
15 struct DefaultSingletonTraits;
18 class IOSChromePrefModelAssociatorClient
19 : public syncable_prefs::PrefModelAssociatorClient {
20 public:
21 // Returns the global instance.
22 static IOSChromePrefModelAssociatorClient* GetInstance();
24 private:
25 friend struct base::DefaultSingletonTraits<
26 IOSChromePrefModelAssociatorClient>;
28 IOSChromePrefModelAssociatorClient();
29 ~IOSChromePrefModelAssociatorClient() override;
31 // syncable_prefs::PrefModelAssociatorClient implementation.
32 bool IsMergeableListPreference(const std::string& pref_name) const override;
33 bool IsMergeableDictionaryPreference(
34 const std::string& pref_name) const override;
35 bool IsMigratedPreference(const std::string& new_pref_name,
36 std::string* old_pref_name) const override;
37 bool IsOldMigratedPreference(const std::string& old_pref_name,
38 std::string* new_pref_name) const override;
40 DISALLOW_COPY_AND_ASSIGN(IOSChromePrefModelAssociatorClient);
43 #endif // IOS_CHROME_BROWSER_PREFS_IOS_CHROME_PREF_MODEL_ASSOCIATOR_CLIENT_H_