OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PENDING_EXTENSION_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_PENDING_EXTENSION_MANAGER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_PENDING_EXTENSION_MANAGER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_PENDING_EXTENSION_MANAGER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 // is already installed. | 73 // is already installed. |
74 // | 74 // |
75 // TODO(akalin): Replace |install_silently| with a list of | 75 // TODO(akalin): Replace |install_silently| with a list of |
76 // pre-enabled permissions. | 76 // pre-enabled permissions. |
77 bool AddFromSync( | 77 bool AddFromSync( |
78 const std::string& id, | 78 const std::string& id, |
79 const GURL& update_url, | 79 const GURL& update_url, |
80 PendingExtensionInfo::ShouldAllowInstallPredicate should_allow_install, | 80 PendingExtensionInfo::ShouldAllowInstallPredicate should_allow_install, |
81 bool install_silently); | 81 bool install_silently); |
82 | 82 |
| 83 // Adds an extension that was depended on by another extension. |
| 84 bool AddFromExtensionImport( |
| 85 const std::string& id, |
| 86 const GURL& update_url, |
| 87 PendingExtensionInfo::ShouldAllowInstallPredicate should_allow_install); |
| 88 |
83 // Given an extension id and an update URL, schedule the extension | 89 // Given an extension id and an update URL, schedule the extension |
84 // to be fetched, installed, and activated. | 90 // to be fetched, installed, and activated. |
85 bool AddFromExternalUpdateUrl(const std::string& id, | 91 bool AddFromExternalUpdateUrl(const std::string& id, |
86 const GURL& update_url, | 92 const GURL& update_url, |
87 Manifest::Location location); | 93 Manifest::Location location); |
88 | 94 |
89 // Add a pending extension record for an external CRX file. | 95 // Add a pending extension record for an external CRX file. |
90 // Return true if the CRX should be installed, false if an existing | 96 // Return true if the CRX should be installed, false if an existing |
91 // pending record overrides it. | 97 // pending record overrides it. |
92 bool AddFromExternalFile( | 98 bool AddFromExternalFile( |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 friend void SetupPendingExtensionManagerForTest( | 139 friend void SetupPendingExtensionManagerForTest( |
134 int count, const GURL& update_url, | 140 int count, const GURL& update_url, |
135 PendingExtensionManager* pending_extension_manager); | 141 PendingExtensionManager* pending_extension_manager); |
136 | 142 |
137 DISALLOW_COPY_AND_ASSIGN(PendingExtensionManager); | 143 DISALLOW_COPY_AND_ASSIGN(PendingExtensionManager); |
138 }; | 144 }; |
139 | 145 |
140 } // namespace extensions | 146 } // namespace extensions |
141 | 147 |
142 #endif // CHROME_BROWSER_EXTENSIONS_PENDING_EXTENSION_MANAGER_H_ | 148 #endif // CHROME_BROWSER_EXTENSIONS_PENDING_EXTENSION_MANAGER_H_ |
OLD | NEW |