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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // any existing backing file we had previously created. | 54 // any existing backing file we had previously created. |
55 void RecreateExtensionPrefs(); | 55 void RecreateExtensionPrefs(); |
56 | 56 |
57 // Creates a new Extension with the given name in our temp dir, adds it to | 57 // Creates a new Extension with the given name in our temp dir, adds it to |
58 // our ExtensionPrefs, and returns it. | 58 // our ExtensionPrefs, and returns it. |
59 scoped_refptr<Extension> AddExtension(const std::string& name); | 59 scoped_refptr<Extension> AddExtension(const std::string& name); |
60 | 60 |
61 // As above, but the extension is an app. | 61 // As above, but the extension is an app. |
62 scoped_refptr<Extension> AddApp(const std::string& name); | 62 scoped_refptr<Extension> AddApp(const std::string& name); |
63 | 63 |
| 64 // Creates a new Extension with the given name in our temp dir with |
| 65 // Manifest::Location, adds it to our ExtensionPrefs, and returns it. |
| 66 scoped_refptr<Extension> AddExtensionWithManifestLocation( |
| 67 const std::string& name, |
| 68 Manifest::Location location); |
| 69 |
64 // Similar to AddExtension, but takes a dictionary with manifest values. | 70 // Similar to AddExtension, but takes a dictionary with manifest values. |
65 scoped_refptr<Extension> AddExtensionWithManifest( | 71 scoped_refptr<Extension> AddExtensionWithManifest( |
66 const base::DictionaryValue& manifest, | 72 const base::DictionaryValue& manifest, |
67 Manifest::Location location); | 73 Manifest::Location location); |
68 | 74 |
69 // Similar to AddExtension, but takes a dictionary with manifest values | 75 // Similar to AddExtension, but takes a dictionary with manifest values |
70 // and extension flags. | 76 // and extension flags. |
71 scoped_refptr<Extension> AddExtensionWithManifestAndFlags( | 77 scoped_refptr<Extension> AddExtensionWithManifestAndFlags( |
72 const base::DictionaryValue& manifest, | 78 const base::DictionaryValue& manifest, |
73 Manifest::Location location, | 79 Manifest::Location location, |
(...skipping 21 matching lines...) Expand all Loading... |
95 const scoped_refptr<base::SequencedTaskRunner> task_runner_; | 101 const scoped_refptr<base::SequencedTaskRunner> task_runner_; |
96 | 102 |
97 private: | 103 private: |
98 bool extensions_disabled_; | 104 bool extensions_disabled_; |
99 DISALLOW_COPY_AND_ASSIGN(TestExtensionPrefs); | 105 DISALLOW_COPY_AND_ASSIGN(TestExtensionPrefs); |
100 }; | 106 }; |
101 | 107 |
102 } // namespace extensions | 108 } // namespace extensions |
103 | 109 |
104 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_ | 110 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_ |
OLD | NEW |