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_CRX_INSTALLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 CrxInstallerError AllowInstall(const Extension* extension); | 222 CrxInstallerError AllowInstall(const Extension* extension); |
223 | 223 |
224 // SandboxedUnpackerClient | 224 // SandboxedUnpackerClient |
225 virtual void OnUnpackFailure(const base::string16& error_message) OVERRIDE; | 225 virtual void OnUnpackFailure(const base::string16& error_message) OVERRIDE; |
226 virtual void OnUnpackSuccess(const base::FilePath& temp_dir, | 226 virtual void OnUnpackSuccess(const base::FilePath& temp_dir, |
227 const base::FilePath& extension_dir, | 227 const base::FilePath& extension_dir, |
228 const base::DictionaryValue* original_manifest, | 228 const base::DictionaryValue* original_manifest, |
229 const Extension* extension, | 229 const Extension* extension, |
230 const SkBitmap& install_icon) OVERRIDE; | 230 const SkBitmap& install_icon) OVERRIDE; |
231 | 231 |
| 232 // Initializes |install_checker_|'s extension's permissions to catch |
| 233 // permission privilege increases due to granting of previously withheld |
| 234 // permissions. |
| 235 void InitializeExtensionPermissions(); |
| 236 |
| 237 // Calls AllowInstall after permissions are initialized and handles errors. |
| 238 void ContinueUnpackSuccess(); |
| 239 |
232 // Called on the UI thread to start the requirements, policy and blacklist | 240 // Called on the UI thread to start the requirements, policy and blacklist |
233 // checks on the extension. | 241 // checks on the extension. |
234 void CheckInstall(); | 242 void CheckInstall(); |
235 | 243 |
236 // Runs on the UI thread. Callback from ExtensionInstallChecker. | 244 // Runs on the UI thread. Callback from ExtensionInstallChecker. |
237 void OnInstallChecksComplete(int failed_checks); | 245 void OnInstallChecksComplete(int failed_checks); |
238 | 246 |
239 // Runs on the UI thread. Callback from Blacklist. | 247 // Runs on the UI thread. Callback from Blacklist. |
240 void OnBlacklistChecked( | 248 void OnBlacklistChecked( |
241 extensions::BlacklistState blacklist_state); | 249 extensions::BlacklistState blacklist_state); |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 | 428 |
421 // Performs requirements, policy and blacklist checks on the extension. | 429 // Performs requirements, policy and blacklist checks on the extension. |
422 ExtensionInstallChecker install_checker_; | 430 ExtensionInstallChecker install_checker_; |
423 | 431 |
424 DISALLOW_COPY_AND_ASSIGN(CrxInstaller); | 432 DISALLOW_COPY_AND_ASSIGN(CrxInstaller); |
425 }; | 433 }; |
426 | 434 |
427 } // namespace extensions | 435 } // namespace extensions |
428 | 436 |
429 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ | 437 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_H_ |
OLD | NEW |