OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/scoped_ptr.h" | 11 #include "base/scoped_ptr.h" |
12 #include "base/scoped_temp_dir.h" | 12 #include "base/scoped_temp_dir.h" |
13 #include "chrome/common/extensions/extension.h" | 13 #include "chrome/common/extensions/extension.h" |
14 | 14 |
15 class DictionaryValue; | 15 class DictionaryValue; |
16 class ExtensionPrefs; | 16 class ExtensionPrefs; |
17 class PrefService; | 17 class PrefService; |
18 | 18 |
19 | |
20 // This is a test class intended to make it easier to work with ExtensionPrefs | 19 // This is a test class intended to make it easier to work with ExtensionPrefs |
21 // in tests. | 20 // in tests. |
22 class TestExtensionPrefs { | 21 class TestExtensionPrefs { |
23 public: | 22 public: |
24 TestExtensionPrefs(); | 23 TestExtensionPrefs(); |
25 virtual ~TestExtensionPrefs(); | 24 virtual ~TestExtensionPrefs(); |
26 | 25 |
27 ExtensionPrefs* prefs() { return prefs_.get(); } | 26 ExtensionPrefs* prefs() { return prefs_.get(); } |
28 PrefService* pref_service() { return pref_service_.get(); } | 27 PrefService* pref_service() { return pref_service_.get(); } |
29 const FilePath& temp_dir() const { return temp_dir_.path(); } | 28 const FilePath& temp_dir() const { return temp_dir_.path(); } |
(...skipping 20 matching lines...) Expand all Loading... |
50 FilePath preferences_file_; | 49 FilePath preferences_file_; |
51 FilePath extensions_dir_; | 50 FilePath extensions_dir_; |
52 scoped_ptr<PrefService> pref_service_; | 51 scoped_ptr<PrefService> pref_service_; |
53 scoped_ptr<ExtensionPrefs> prefs_; | 52 scoped_ptr<ExtensionPrefs> prefs_; |
54 | 53 |
55 private: | 54 private: |
56 DISALLOW_COPY_AND_ASSIGN(TestExtensionPrefs); | 55 DISALLOW_COPY_AND_ASSIGN(TestExtensionPrefs); |
57 }; | 56 }; |
58 | 57 |
59 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_ | 58 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_ |
OLD | NEW |