| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 // Returns true if any extensions are installed. | 100 // Returns true if any extensions are installed. |
| 101 virtual bool HasInstalledExtensions() { | 101 virtual bool HasInstalledExtensions() { |
| 102 return !(extensions_.empty() && disabled_extensions_.empty()); | 102 return !(extensions_.empty() && disabled_extensions_.empty()); |
| 103 } | 103 } |
| 104 | 104 |
| 105 virtual void SetLastPingDay(const std::string& extension_id, | 105 virtual void SetLastPingDay(const std::string& extension_id, |
| 106 const base::Time& time); | 106 const base::Time& time); |
| 107 virtual base::Time LastPingDay(const std::string& extension_id); | 107 virtual base::Time LastPingDay(const std::string& extension_id); |
| 108 | 108 |
| 109 // Returns true if this extension can run in an incognito window. The |
| 110 // decision is based on both user consent and the extension having the right |
| 111 // permission. |
| 112 bool IsIncognitoEnabled(const std::string& extension_id); |
| 109 | 113 |
| 110 const FilePath& install_directory() const { return install_directory_; } | 114 const FilePath& install_directory() const { return install_directory_; } |
| 111 | 115 |
| 112 // Initialize and start all installed extensions. | 116 // Initialize and start all installed extensions. |
| 113 void Init(); | 117 void Init(); |
| 114 | 118 |
| 115 // Look up an extension by ID. | 119 // Look up an extension by ID. |
| 116 Extension* GetExtensionById(const std::string& id, bool include_disabled) { | 120 Extension* GetExtensionById(const std::string& id, bool include_disabled) { |
| 117 return GetExtensionByIdInternal(id, true, include_disabled); | 121 return GetExtensionByIdInternal(id, true, include_disabled); |
| 118 } | 122 } |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 | 434 |
| 431 // A map of all external extension providers. | 435 // A map of all external extension providers. |
| 432 typedef std::map<Extension::Location, | 436 typedef std::map<Extension::Location, |
| 433 linked_ptr<ExternalExtensionProvider> > ProviderMap; | 437 linked_ptr<ExternalExtensionProvider> > ProviderMap; |
| 434 ProviderMap external_extension_providers_; | 438 ProviderMap external_extension_providers_; |
| 435 | 439 |
| 436 DISALLOW_COPY_AND_ASSIGN(ExtensionsServiceBackend); | 440 DISALLOW_COPY_AND_ASSIGN(ExtensionsServiceBackend); |
| 437 }; | 441 }; |
| 438 | 442 |
| 439 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ | 443 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ |
| OLD | NEW |