OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_EXTENSION_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 // The name of the directory inside the profile where per-extension settings | 146 // The name of the directory inside the profile where per-extension settings |
147 // are stored. | 147 // are stored. |
148 static const char* kSettingsDirectoryName; | 148 static const char* kSettingsDirectoryName; |
149 | 149 |
150 // Determine if a given extension download should be treated as if it came | 150 // Determine if a given extension download should be treated as if it came |
151 // from the gallery. Note that this is requires *both* that the download_url | 151 // from the gallery. Note that this is requires *both* that the download_url |
152 // match and that the download was referred from a gallery page. | 152 // match and that the download was referred from a gallery page. |
153 bool IsDownloadFromGallery(const GURL& download_url, | 153 bool IsDownloadFromGallery(const GURL& download_url, |
154 const GURL& referrer_url); | 154 const GURL& referrer_url); |
155 | 155 |
156 // Determine if the downloaded extension came from the theme mini-gallery, | |
157 // Used to test if we need to show the "Loading" dialog for themes. | |
158 static bool IsDownloadFromMiniGallery(const GURL& download_url); | |
159 | |
160 // Returns the Extension of hosted or packaged apps, NULL otherwise. | 156 // Returns the Extension of hosted or packaged apps, NULL otherwise. |
161 const Extension* GetInstalledApp(const GURL& url); | 157 const Extension* GetInstalledApp(const GURL& url); |
162 | 158 |
163 // Returns whether the URL is from either a hosted or packaged app. | 159 // Returns whether the URL is from either a hosted or packaged app. |
164 bool IsInstalledApp(const GURL& url); | 160 bool IsInstalledApp(const GURL& url); |
165 | 161 |
166 // Associates a renderer process with the given installed app. | 162 // Associates a renderer process with the given installed app. |
167 void SetInstalledAppForRenderer(int renderer_child_id, const Extension* app); | 163 void SetInstalledAppForRenderer(int renderer_child_id, const Extension* app); |
168 | 164 |
169 // If the renderer is hosting an installed app, returns it, otherwise returns | 165 // If the renderer is hosting an installed app, returns it, otherwise returns |
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 ExtensionWarningSet extension_warnings_; | 835 ExtensionWarningSet extension_warnings_; |
840 | 836 |
841 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 837 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
842 InstallAppsWithUnlimtedStorage); | 838 InstallAppsWithUnlimtedStorage); |
843 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 839 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
844 InstallAppsAndCheckStorageProtection); | 840 InstallAppsAndCheckStorageProtection); |
845 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 841 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
846 }; | 842 }; |
847 | 843 |
848 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 844 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
OLD | NEW |