| 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_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 public: | 41 public: |
| 42 explicit TestExtensionPrefs( | 42 explicit TestExtensionPrefs( |
| 43 const scoped_refptr<base::SequencedTaskRunner>& task_runner); | 43 const scoped_refptr<base::SequencedTaskRunner>& task_runner); |
| 44 virtual ~TestExtensionPrefs(); | 44 virtual ~TestExtensionPrefs(); |
| 45 | 45 |
| 46 ExtensionPrefs* prefs(); | 46 ExtensionPrefs* prefs(); |
| 47 | 47 |
| 48 PrefService* pref_service(); | 48 PrefService* pref_service(); |
| 49 const scoped_refptr<user_prefs::PrefRegistrySyncable>& pref_registry(); | 49 const scoped_refptr<user_prefs::PrefRegistrySyncable>& pref_registry(); |
| 50 void ResetPrefRegistry(); | 50 void ResetPrefRegistry(); |
| 51 const base::FilePath& temp_dir() const { return temp_dir_.path(); } | 51 const base::FilePath& temp_dir() const { return temp_dir_.GetPath(); } |
| 52 const base::FilePath& extensions_dir() const { return extensions_dir_; } | 52 const base::FilePath& extensions_dir() const { return extensions_dir_; } |
| 53 ExtensionPrefValueMap* extension_pref_value_map() { | 53 ExtensionPrefValueMap* extension_pref_value_map() { |
| 54 return extension_pref_value_map_.get(); | 54 return extension_pref_value_map_.get(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 // This will cause the ExtensionPrefs to be deleted and recreated, based on | 57 // This will cause the ExtensionPrefs to be deleted and recreated, based on |
| 58 // any existing backing file we had previously created. | 58 // any existing backing file we had previously created. |
| 59 void RecreateExtensionPrefs(); | 59 void RecreateExtensionPrefs(); |
| 60 | 60 |
| 61 // Creates a new Extension with the given name in our temp dir, adds it to | 61 // Creates a new Extension with the given name in our temp dir, adds it to |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 105 private: | 105 private: |
| 106 TestingProfile profile_; | 106 TestingProfile profile_; |
| 107 bool extensions_disabled_; | 107 bool extensions_disabled_; |
| 108 DISALLOW_COPY_AND_ASSIGN(TestExtensionPrefs); | 108 DISALLOW_COPY_AND_ASSIGN(TestExtensionPrefs); |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 } // namespace extensions | 111 } // namespace extensions |
| 112 | 112 |
| 113 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_ | 113 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_ |
| OLD | NEW |