| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_TEST_BASE_TESTING_PREF_SERVICE_H_ | 5 #ifndef CHROME_TEST_BASE_TESTING_PREF_SERVICE_H_ |
| 6 #define CHROME_TEST_BASE_TESTING_PREF_SERVICE_H_ | 6 #define CHROME_TEST_BASE_TESTING_PREF_SERVICE_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "chrome/browser/prefs/pref_service.h" | 9 #include "chrome/browser/prefs/pref_service.h" |
| 10 | 10 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 const Value* GetRecommendedPref(const char* path) const; | 42 const Value* GetRecommendedPref(const char* path) const; |
| 43 void SetRecommendedPref(const char* path, Value* value); | 43 void SetRecommendedPref(const char* path, Value* value); |
| 44 void RemoveRecommendedPref(const char* path); | 44 void RemoveRecommendedPref(const char* path); |
| 45 | 45 |
| 46 protected: | 46 protected: |
| 47 TestingPrefServiceBase( | 47 TestingPrefServiceBase( |
| 48 TestingPrefStore* managed_prefs, | 48 TestingPrefStore* managed_prefs, |
| 49 TestingPrefStore* user_prefs, | 49 TestingPrefStore* user_prefs, |
| 50 TestingPrefStore* recommended_prefs, | 50 TestingPrefStore* recommended_prefs, |
| 51 DefaultPrefStore* default_store, | 51 DefaultPrefStore* default_store, |
| 52 PrefModelAssociator* pref_sync_associator, | |
| 53 PrefNotifierImpl* pref_notifier); | 52 PrefNotifierImpl* pref_notifier); |
| 54 | 53 |
| 55 private: | 54 private: |
| 56 // Reads the value of the preference indicated by |path| from |pref_store|. | 55 // Reads the value of the preference indicated by |path| from |pref_store|. |
| 57 // Returns NULL if the preference was not found. | 56 // Returns NULL if the preference was not found. |
| 58 const Value* GetPref(TestingPrefStore* pref_store, const char* path) const; | 57 const Value* GetPref(TestingPrefStore* pref_store, const char* path) const; |
| 59 | 58 |
| 60 // Sets the value for |path| in |pref_store|. | 59 // Sets the value for |path| in |pref_store|. |
| 61 void SetPref(TestingPrefStore* pref_store, const char* path, Value* value); | 60 void SetPref(TestingPrefStore* pref_store, const char* path, Value* value); |
| 62 | 61 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 93 } | 92 } |
| 94 | 93 |
| 95 private: | 94 private: |
| 96 TestingBrowserProcess* browser_process_; | 95 TestingBrowserProcess* browser_process_; |
| 97 TestingPrefService local_state_; | 96 TestingPrefService local_state_; |
| 98 | 97 |
| 99 DISALLOW_COPY_AND_ASSIGN(ScopedTestingLocalState); | 98 DISALLOW_COPY_AND_ASSIGN(ScopedTestingLocalState); |
| 100 }; | 99 }; |
| 101 | 100 |
| 102 #endif // CHROME_TEST_BASE_TESTING_PREF_SERVICE_H_ | 101 #endif // CHROME_TEST_BASE_TESTING_PREF_SERVICE_H_ |
| OLD | NEW |