Index: chrome/browser/extensions/crx_installer.cc |
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc |
index 8a370a03f3bee350911abfcbe7003d3f0afab23f..bc49ed2a00d32d848d88be62d800ae50b8004c52 100644 |
--- a/chrome/browser/extensions/crx_installer.cc |
+++ b/chrome/browser/extensions/crx_installer.cc |
@@ -459,6 +459,26 @@ void CrxInstaller::OnUnpackSuccess( |
// the temp dir. |
unpacked_extension_root_ = extension_dir; |
+ if (!BrowserThread::PostTask( |
+ BrowserThread::UI, |
+ FROM_HERE, |
+ base::Bind(&CrxInstaller::InitializeExtensionPermissions, this))) |
Devlin
2014/09/09 16:04:26
Ew. We already bounce around a ton in extension i
gpdavis
2014/09/09 17:48:53
Well, the goal here is to call InitializePermissio
Devlin
2014/09/09 17:57:44
Hmm... that makes me wonder if this is actually th
|
+ NOTREACHED(); |
+} |
+ |
+void CrxInstaller::InitializeExtensionPermissions() { |
+ DCHECK_CURRENTLY_ON(BrowserThread::UI); |
+ PermissionsUpdater(profile()).InitializePermissions( |
+ install_checker_.extension().get()); |
+ if (!installer_task_runner_->PostTask( |
+ FROM_HERE, |
+ base::Bind(&CrxInstaller::ContinueUnpackSuccess, this))) |
+ NOTREACHED(); |
+} |
+ |
+void CrxInstaller::ContinueUnpackSuccess() { |
+ DCHECK(installer_task_runner_->RunsTasksOnCurrentThread()); |
+ const Extension* extension = install_checker_.extension().get(); |
CrxInstallerError error = AllowInstall(extension); |
if (error.type() != CrxInstallerError::ERROR_NONE) { |
ReportFailureFromFileThread(error); |