| 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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 | 379 |
| 380 Profile* profile() { return profile_; } | 380 Profile* profile() { return profile_; } |
| 381 | 381 |
| 382 // Profile calls this when it is being destroyed so that we know not to call | 382 // Profile calls this when it is being destroyed so that we know not to call |
| 383 // it. | 383 // it. |
| 384 void DestroyingProfile(); | 384 void DestroyingProfile(); |
| 385 | 385 |
| 386 ExtensionPrefs* extension_prefs() { return extension_prefs_.get(); } | 386 ExtensionPrefs* extension_prefs() { return extension_prefs_.get(); } |
| 387 | 387 |
| 388 // Whether the extension service is ready. | 388 // Whether the extension service is ready. |
| 389 // TODO(skerner): Get rid of this method. crbug.com/63756 |
| 389 bool is_ready() { return ready_; } | 390 bool is_ready() { return ready_; } |
| 390 | 391 |
| 391 // Note that this may return NULL if autoupdate is not turned on. | 392 // Note that this may return NULL if autoupdate is not turned on. |
| 392 ExtensionUpdater* updater() { return updater_.get(); } | 393 ExtensionUpdater* updater() { return updater_.get(); } |
| 393 | 394 |
| 394 ExtensionToolbarModel* toolbar_model() { return &toolbar_model_; } | 395 ExtensionToolbarModel* toolbar_model() { return &toolbar_model_; } |
| 395 | 396 |
| 396 ExtensionsQuotaService* quota_service() { return "a_service_; } | 397 ExtensionsQuotaService* quota_service() { return "a_service_; } |
| 397 | 398 |
| 398 ExtensionMenuManager* menu_manager() { return &menu_manager_; } | 399 ExtensionMenuManager* menu_manager() { return &menu_manager_; } |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 | 506 |
| 506 // Whether to notify users when they attempt to install an extension. | 507 // Whether to notify users when they attempt to install an extension. |
| 507 bool show_extensions_prompts_; | 508 bool show_extensions_prompts_; |
| 508 | 509 |
| 509 // The backend that will do IO on behalf of this instance. | 510 // The backend that will do IO on behalf of this instance. |
| 510 scoped_refptr<ExtensionsServiceBackend> backend_; | 511 scoped_refptr<ExtensionsServiceBackend> backend_; |
| 511 | 512 |
| 512 // Used by dispatchers to limit API quota for individual extensions. | 513 // Used by dispatchers to limit API quota for individual extensions. |
| 513 ExtensionsQuotaService quota_service_; | 514 ExtensionsQuotaService quota_service_; |
| 514 | 515 |
| 515 // Is the service ready to go? | 516 // Record that Init() has been called, and NotificationType::EXTENSIONS_READY |
| 517 // has fired. |
| 516 bool ready_; | 518 bool ready_; |
| 517 | 519 |
| 518 // Our extension updater, if updates are turned on. | 520 // Our extension updater, if updates are turned on. |
| 519 scoped_refptr<ExtensionUpdater> updater_; | 521 scoped_refptr<ExtensionUpdater> updater_; |
| 520 | 522 |
| 521 // The model that tracks extensions with BrowserAction buttons. | 523 // The model that tracks extensions with BrowserAction buttons. |
| 522 ExtensionToolbarModel toolbar_model_; | 524 ExtensionToolbarModel toolbar_model_; |
| 523 | 525 |
| 524 // Map unloaded extensions' ids to their paths. When a temporarily loaded | 526 // Map unloaded extensions' ids to their paths. When a temporarily loaded |
| 525 // extension is unloaded, we lose the infomation about it and don't have | 527 // extension is unloaded, we lose the infomation about it and don't have |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, | 576 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, |
| 575 UpdatePendingExtensionAlreadyInstalled); | 577 UpdatePendingExtensionAlreadyInstalled); |
| 576 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, | 578 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, |
| 577 InstallAppsWithUnlimtedStorage); | 579 InstallAppsWithUnlimtedStorage); |
| 578 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, | 580 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, |
| 579 InstallAppsAndCheckStorageProtection); | 581 InstallAppsAndCheckStorageProtection); |
| 580 DISALLOW_COPY_AND_ASSIGN(ExtensionsService); | 582 DISALLOW_COPY_AND_ASSIGN(ExtensionsService); |
| 581 }; | 583 }; |
| 582 | 584 |
| 583 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ | 585 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ |
| OLD | NEW |