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 125 matching lines...) Loading... |
136 // Determine if a given extension download should be treated as if it came | 136 // Determine if a given extension download should be treated as if it came |
137 // from the gallery. Note that this is requires *both* that the download_url | 137 // from the gallery. Note that this is requires *both* that the download_url |
138 // match and that the download was referred from a gallery page. | 138 // match and that the download was referred from a gallery page. |
139 bool IsDownloadFromGallery(const GURL& download_url, | 139 bool IsDownloadFromGallery(const GURL& download_url, |
140 const GURL& referrer_url); | 140 const GURL& referrer_url); |
141 | 141 |
142 // Determine if the downloaded extension came from the theme mini-gallery, | 142 // Determine if the downloaded extension came from the theme mini-gallery, |
143 // Used to test if we need to show the "Loading" dialog for themes. | 143 // Used to test if we need to show the "Loading" dialog for themes. |
144 static bool IsDownloadFromMiniGallery(const GURL& download_url); | 144 static bool IsDownloadFromMiniGallery(const GURL& download_url); |
145 | 145 |
| 146 // Returns whether the URL is from either a hosted or packaged app. |
| 147 bool IsInstalledApp(const GURL& url); |
| 148 |
146 // Attempts to uninstall an extension from a given ExtensionService. Returns | 149 // Attempts to uninstall an extension from a given ExtensionService. Returns |
147 // true iff the target extension exists. | 150 // true iff the target extension exists. |
148 static bool UninstallExtensionHelper(ExtensionsService* extensions_service, | 151 static bool UninstallExtensionHelper(ExtensionsService* extensions_service, |
149 const std::string& extension_id); | 152 const std::string& extension_id); |
150 | 153 |
151 ExtensionsService(Profile* profile, | 154 ExtensionsService(Profile* profile, |
152 const CommandLine* command_line, | 155 const CommandLine* command_line, |
153 const FilePath& install_directory, | 156 const FilePath& install_directory, |
154 bool autoupdate_enabled); | 157 bool autoupdate_enabled); |
155 | 158 |
(...skipping 442 matching lines...) Loading... |
598 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, | 601 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, |
599 UpdatePendingExtensionAlreadyInstalled); | 602 UpdatePendingExtensionAlreadyInstalled); |
600 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, | 603 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, |
601 InstallAppsWithUnlimtedStorage); | 604 InstallAppsWithUnlimtedStorage); |
602 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, | 605 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, |
603 InstallAppsAndCheckStorageProtection); | 606 InstallAppsAndCheckStorageProtection); |
604 DISALLOW_COPY_AND_ASSIGN(ExtensionsService); | 607 DISALLOW_COPY_AND_ASSIGN(ExtensionsService); |
605 }; | 608 }; |
606 | 609 |
607 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ | 610 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ |
OLD | NEW |