OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_UTIL_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 | 78 |
79 // Returns true if |extension_id| can be launched (possibly only after being | 79 // Returns true if |extension_id| can be launched (possibly only after being |
80 // enabled). | 80 // enabled). |
81 bool IsAppLaunchable(const std::string& extension_id, | 81 bool IsAppLaunchable(const std::string& extension_id, |
82 content::BrowserContext* context); | 82 content::BrowserContext* context); |
83 | 83 |
84 // Returns true if |extension_id| can be launched without being enabled first. | 84 // Returns true if |extension_id| can be launched without being enabled first. |
85 bool IsAppLaunchableWithoutEnabling(const std::string& extension_id, | 85 bool IsAppLaunchableWithoutEnabling(const std::string& extension_id, |
86 content::BrowserContext* context); | 86 content::BrowserContext* context); |
87 | 87 |
| 88 // Returns true if |extension| should be synced. |
| 89 bool ShouldSyncExtension(const Extension* extension, |
| 90 content::BrowserContext* context); |
| 91 |
88 // Returns true if |app| should be synced. | 92 // Returns true if |app| should be synced. |
89 bool ShouldSyncApp(const Extension* app, content::BrowserContext* context); | 93 bool ShouldSyncApp(const Extension* app, content::BrowserContext* context); |
90 | 94 |
91 // Returns true if |extension_id| is idle and it is safe to perform actions such | 95 // Returns true if |extension_id| is idle and it is safe to perform actions such |
92 // as updating. | 96 // as updating. |
93 bool IsExtensionIdle(const std::string& extension_id, | 97 bool IsExtensionIdle(const std::string& extension_id, |
94 content::BrowserContext* context); | 98 content::BrowserContext* context); |
95 | 99 |
96 // Returns the site of the |extension_id|, given the associated |context|. | 100 // Returns the site of the |extension_id|, given the associated |context|. |
97 // Suitable for use with BrowserContext::GetStoragePartitionForSite(). | 101 // Suitable for use with BrowserContext::GetStoragePartitionForSite(). |
(...skipping 14 matching lines...) Expand all Loading... |
112 | 116 |
113 // Returns the default extension/app icon (for extensions or apps that don't | 117 // Returns the default extension/app icon (for extensions or apps that don't |
114 // have one). | 118 // have one). |
115 const gfx::ImageSkia& GetDefaultExtensionIcon(); | 119 const gfx::ImageSkia& GetDefaultExtensionIcon(); |
116 const gfx::ImageSkia& GetDefaultAppIcon(); | 120 const gfx::ImageSkia& GetDefaultAppIcon(); |
117 | 121 |
118 } // namespace util | 122 } // namespace util |
119 } // namespace extensions | 123 } // namespace extensions |
120 | 124 |
121 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ | 125 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UTIL_H_ |
OLD | NEW |