| 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_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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 } | 374 } |
| 375 | 375 |
| 376 Profile* profile() { return profile_; } | 376 Profile* profile() { return profile_; } |
| 377 | 377 |
| 378 // Profile calls this when it is being destroyed so that we know not to call | 378 // Profile calls this when it is being destroyed so that we know not to call |
| 379 // it. | 379 // it. |
| 380 void DestroyingProfile(); | 380 void DestroyingProfile(); |
| 381 | 381 |
| 382 ExtensionPrefs* extension_prefs() { return extension_prefs_.get(); } | 382 ExtensionPrefs* extension_prefs() { return extension_prefs_.get(); } |
| 383 | 383 |
| 384 // Whether the extension service is ready. | |
| 385 bool is_ready() { return ready_; } | |
| 386 | |
| 387 // Note that this may return NULL if autoupdate is not turned on. | 384 // Note that this may return NULL if autoupdate is not turned on. |
| 388 ExtensionUpdater* updater() { return updater_.get(); } | 385 ExtensionUpdater* updater() { return updater_.get(); } |
| 389 | 386 |
| 390 ExtensionToolbarModel* toolbar_model() { return &toolbar_model_; } | 387 ExtensionToolbarModel* toolbar_model() { return &toolbar_model_; } |
| 391 | 388 |
| 392 ExtensionsQuotaService* quota_service() { return "a_service_; } | 389 ExtensionsQuotaService* quota_service() { return "a_service_; } |
| 393 | 390 |
| 394 ExtensionMenuManager* menu_manager() { return &menu_manager_; } | 391 ExtensionMenuManager* menu_manager() { return &menu_manager_; } |
| 395 | 392 |
| 396 const std::map<GURL, int>& protected_storage_map() const { | 393 const std::map<GURL, int>& protected_storage_map() const { |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 | 498 |
| 502 // Whether to notify users when they attempt to install an extension. | 499 // Whether to notify users when they attempt to install an extension. |
| 503 bool show_extensions_prompts_; | 500 bool show_extensions_prompts_; |
| 504 | 501 |
| 505 // The backend that will do IO on behalf of this instance. | 502 // The backend that will do IO on behalf of this instance. |
| 506 scoped_refptr<ExtensionsServiceBackend> backend_; | 503 scoped_refptr<ExtensionsServiceBackend> backend_; |
| 507 | 504 |
| 508 // Used by dispatchers to limit API quota for individual extensions. | 505 // Used by dispatchers to limit API quota for individual extensions. |
| 509 ExtensionsQuotaService quota_service_; | 506 ExtensionsQuotaService quota_service_; |
| 510 | 507 |
| 511 // Is the service ready to go? | 508 // Record that Init() has been called. |
| 512 bool ready_; | 509 bool init_done_; |
| 513 | 510 |
| 514 // Our extension updater, if updates are turned on. | 511 // Our extension updater, if updates are turned on. |
| 515 scoped_refptr<ExtensionUpdater> updater_; | 512 scoped_refptr<ExtensionUpdater> updater_; |
| 516 | 513 |
| 517 // The model that tracks extensions with BrowserAction buttons. | 514 // The model that tracks extensions with BrowserAction buttons. |
| 518 ExtensionToolbarModel toolbar_model_; | 515 ExtensionToolbarModel toolbar_model_; |
| 519 | 516 |
| 520 // Map unloaded extensions' ids to their paths. When a temporarily loaded | 517 // Map unloaded extensions' ids to their paths. When a temporarily loaded |
| 521 // extension is unloaded, we lose the infomation about it and don't have | 518 // extension is unloaded, we lose the infomation about it and don't have |
| 522 // any in the extension preferences file. | 519 // any in the extension preferences file. |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, | 567 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, |
| 571 UpdatePendingExtensionAlreadyInstalled); | 568 UpdatePendingExtensionAlreadyInstalled); |
| 572 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, | 569 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, |
| 573 InstallAppsWithUnlimtedStorage); | 570 InstallAppsWithUnlimtedStorage); |
| 574 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, | 571 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, |
| 575 InstallAppsAndCheckStorageProtection); | 572 InstallAppsAndCheckStorageProtection); |
| 576 DISALLOW_COPY_AND_ASSIGN(ExtensionsService); | 573 DISALLOW_COPY_AND_ASSIGN(ExtensionsService); |
| 577 }; | 574 }; |
| 578 | 575 |
| 579 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ | 576 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ |
| OLD | NEW |