| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_EXTENSIONS_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 void SetProviderForTesting(Extension::Location location, | 296 void SetProviderForTesting(Extension::Location location, |
| 297 ExternalExtensionProvider* test_provider); | 297 ExternalExtensionProvider* test_provider); |
| 298 | 298 |
| 299 // ExternalExtensionProvider::Visitor implementation. | 299 // ExternalExtensionProvider::Visitor implementation. |
| 300 virtual void OnExternalExtensionFound(const std::string& id, | 300 virtual void OnExternalExtensionFound(const std::string& id, |
| 301 const Version* version, | 301 const Version* version, |
| 302 const FilePath& path, | 302 const FilePath& path, |
| 303 Extension::Location location); | 303 Extension::Location location); |
| 304 private: | 304 private: |
| 305 // Loads a single installed extension. | 305 // Loads a single installed extension. |
| 306 void LoadInstalledExtension(const std::string& id, const FilePath& path, | 306 void LoadInstalledExtension(DictionaryValue* manifest, |
| 307 const std::string& id, |
| 308 const FilePath& path, |
| 307 Extension::Location location); | 309 Extension::Location location); |
| 308 | 310 |
| 309 // Finish installing the extension in |crx_path| after it has been unpacked to | 311 // Finish installing the extension in |crx_path| after it has been unpacked to |
| 310 // |unpacked_path|. If |expected_id| is not empty, it's verified against the | 312 // |unpacked_path|. If |expected_id| is not empty, it's verified against the |
| 311 // extension's manifest before installation. If |silent| is true, there will | 313 // extension's manifest before installation. If |silent| is true, there will |
| 312 // be no install confirmation dialog. |from_gallery| indicates whether the | 314 // be no install confirmation dialog. |from_gallery| indicates whether the |
| 313 // crx was installed from our gallery, which results in different UI. | 315 // crx was installed from our gallery, which results in different UI. |
| 314 // | 316 // |
| 315 // Note: We take ownership of |extension|. | 317 // Note: We take ownership of |extension|. |
| 316 void OnExtensionUnpacked( | 318 void OnExtensionUnpacked( |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 | 363 |
| 362 // A map of all external extension providers. | 364 // A map of all external extension providers. |
| 363 typedef std::map<Extension::Location, | 365 typedef std::map<Extension::Location, |
| 364 linked_ptr<ExternalExtensionProvider> > ProviderMap; | 366 linked_ptr<ExternalExtensionProvider> > ProviderMap; |
| 365 ProviderMap external_extension_providers_; | 367 ProviderMap external_extension_providers_; |
| 366 | 368 |
| 367 DISALLOW_COPY_AND_ASSIGN(ExtensionsServiceBackend); | 369 DISALLOW_COPY_AND_ASSIGN(ExtensionsServiceBackend); |
| 368 }; | 370 }; |
| 369 | 371 |
| 370 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ | 372 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ |
| OLD | NEW |