OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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_EXTENSION_SERVICE_TEST_WITH_INSTALL_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_WITH_INSTALL_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_WITH_INSTALL_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_WITH_INSTALL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 115 |
116 // ExtensionRegistryObserver: | 116 // ExtensionRegistryObserver: |
117 void OnExtensionLoaded(content::BrowserContext* browser_context, | 117 void OnExtensionLoaded(content::BrowserContext* browser_context, |
118 const Extension* extension) override; | 118 const Extension* extension) override; |
119 void OnExtensionUnloaded(content::BrowserContext* browser_context, | 119 void OnExtensionUnloaded(content::BrowserContext* browser_context, |
120 const Extension* extension, | 120 const Extension* extension, |
121 UnloadedExtensionInfo::Reason reason) override; | 121 UnloadedExtensionInfo::Reason reason) override; |
122 void OnExtensionWillBeInstalled(content::BrowserContext* browser_context, | 122 void OnExtensionWillBeInstalled(content::BrowserContext* browser_context, |
123 const Extension* extension, | 123 const Extension* extension, |
124 bool is_update, | 124 bool is_update, |
125 bool from_ephemeral, | |
126 const std::string& old_name) override; | 125 const std::string& old_name) override; |
127 | 126 |
128 // TODO(treib,devlin): Make these private and add accessors as needed. | 127 // TODO(treib,devlin): Make these private and add accessors as needed. |
129 extensions::ExtensionList loaded_; | 128 extensions::ExtensionList loaded_; |
130 const Extension* installed_; | 129 const Extension* installed_; |
131 bool was_update_; | 130 bool was_update_; |
132 std::string old_name_; | 131 std::string old_name_; |
133 std::string unloaded_id_; | 132 std::string unloaded_id_; |
134 UnloadedExtensionInfo::Reason unloaded_reason_; | 133 UnloadedExtensionInfo::Reason unloaded_reason_; |
135 | 134 |
136 private: | 135 private: |
137 void InstallCRXInternal(const base::FilePath& crx_path, int creation_flags); | 136 void InstallCRXInternal(const base::FilePath& crx_path, int creation_flags); |
138 | 137 |
139 size_t expected_extensions_count_; | 138 size_t expected_extensions_count_; |
140 | 139 |
141 FeatureSwitch::ScopedOverride override_external_install_prompt_; | 140 FeatureSwitch::ScopedOverride override_external_install_prompt_; |
142 | 141 |
143 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> | 142 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
144 registry_observer_; | 143 registry_observer_; |
145 | 144 |
146 DISALLOW_COPY_AND_ASSIGN(ExtensionServiceTestWithInstall); | 145 DISALLOW_COPY_AND_ASSIGN(ExtensionServiceTestWithInstall); |
147 }; | 146 }; |
148 | 147 |
149 } // namespace extensions | 148 } // namespace extensions |
150 | 149 |
151 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_WITH_INSTALL_H_ | 150 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_WITH_INSTALL_H_ |
OLD | NEW |