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_COMPONENT_LOADER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_COMPONENT_LOADER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_COMPONENT_LOADER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_COMPONENT_LOADER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
| 10 #include <memory> |
10 #include <string> | 11 #include <string> |
11 #include <vector> | 12 #include <vector> |
12 | 13 |
13 #include "base/callback_forward.h" | 14 #include "base/callback_forward.h" |
14 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
15 #include "base/macros.h" | 16 #include "base/macros.h" |
16 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
17 #include "base/memory/scoped_ptr.h" | |
18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
19 #include "base/values.h" | 19 #include "base/values.h" |
20 #include "build/build_config.h" | 20 #include "build/build_config.h" |
21 | 21 |
22 class ExtensionServiceInterface; | 22 class ExtensionServiceInterface; |
23 class PrefService; | 23 class PrefService; |
24 class Profile; | 24 class Profile; |
25 | 25 |
26 namespace extensions { | 26 namespace extensions { |
27 | 27 |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 const char* extension_id, | 187 const char* extension_id, |
188 const base::Closure& done_cb); | 188 const base::Closure& done_cb); |
189 | 189 |
190 // Used as a reply callback by |AddWithManifestFile|. | 190 // Used as a reply callback by |AddWithManifestFile|. |
191 // Called with a |root_directory| and parsed |manifest| and invokes | 191 // Called with a |root_directory| and parsed |manifest| and invokes |
192 // |done_cb| after adding the extension. | 192 // |done_cb| after adding the extension. |
193 void FinishAddWithManifestFile( | 193 void FinishAddWithManifestFile( |
194 const base::FilePath& root_directory, | 194 const base::FilePath& root_directory, |
195 const char* extension_id, | 195 const char* extension_id, |
196 const base::Closure& done_cb, | 196 const base::Closure& done_cb, |
197 scoped_ptr<base::DictionaryValue> manifest); | 197 std::unique_ptr<base::DictionaryValue> manifest); |
198 #endif | 198 #endif |
199 | 199 |
200 PrefService* profile_prefs_; | 200 PrefService* profile_prefs_; |
201 PrefService* local_state_; | 201 PrefService* local_state_; |
202 Profile* profile_; | 202 Profile* profile_; |
203 | 203 |
204 ExtensionServiceInterface* extension_service_; | 204 ExtensionServiceInterface* extension_service_; |
205 | 205 |
206 // List of registered component extensions (see Manifest::Location). | 206 // List of registered component extensions (see Manifest::Location). |
207 typedef std::vector<ComponentExtensionInfo> RegisteredComponentExtensions; | 207 typedef std::vector<ComponentExtensionInfo> RegisteredComponentExtensions; |
208 RegisteredComponentExtensions component_extensions_; | 208 RegisteredComponentExtensions component_extensions_; |
209 | 209 |
210 bool ignore_whitelist_for_testing_; | 210 bool ignore_whitelist_for_testing_; |
211 | 211 |
212 base::WeakPtrFactory<ComponentLoader> weak_factory_; | 212 base::WeakPtrFactory<ComponentLoader> weak_factory_; |
213 | 213 |
214 friend class TtsApiTest; | 214 friend class TtsApiTest; |
215 | 215 |
216 DISALLOW_COPY_AND_ASSIGN(ComponentLoader); | 216 DISALLOW_COPY_AND_ASSIGN(ComponentLoader); |
217 }; | 217 }; |
218 | 218 |
219 } // namespace extensions | 219 } // namespace extensions |
220 | 220 |
221 #endif // CHROME_BROWSER_EXTENSIONS_COMPONENT_LOADER_H_ | 221 #endif // CHROME_BROWSER_EXTENSIONS_COMPONENT_LOADER_H_ |
OLD | NEW |