| 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 #include "chrome/browser/extensions/crx_installer.h" | 5 #include "chrome/browser/extensions/crx_installer.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 NotifyCrxInstallBegin(); | 181 NotifyCrxInstallBegin(); |
| 182 | 182 |
| 183 source_file_ = source_file.path; | 183 source_file_ = source_file.path; |
| 184 | 184 |
| 185 scoped_refptr<SandboxedUnpacker> unpacker(new SandboxedUnpacker( | 185 scoped_refptr<SandboxedUnpacker> unpacker(new SandboxedUnpacker( |
| 186 install_source_, creation_flags_, install_directory_, | 186 install_source_, creation_flags_, install_directory_, |
| 187 installer_task_runner_.get(), this)); | 187 installer_task_runner_.get(), this)); |
| 188 | 188 |
| 189 if (!installer_task_runner_->PostTask( | 189 if (!installer_task_runner_->PostTask( |
| 190 FROM_HERE, base::Bind(&SandboxedUnpacker::StartWithCrx, | 190 FROM_HERE, base::Bind(&SandboxedUnpacker::StartWithCrx, |
| 191 unpacker.get(), source_file))) { | 191 unpacker, source_file))) { |
| 192 NOTREACHED(); | 192 NOTREACHED(); |
| 193 } | 193 } |
| 194 } | 194 } |
| 195 | 195 |
| 196 void CrxInstaller::InstallUserScript(const base::FilePath& source_file, | 196 void CrxInstaller::InstallUserScript(const base::FilePath& source_file, |
| 197 const GURL& download_url) { | 197 const GURL& download_url) { |
| 198 DCHECK(!download_url.is_empty()); | 198 DCHECK(!download_url.is_empty()); |
| 199 | 199 |
| 200 NotifyCrxInstallBegin(); | 200 NotifyCrxInstallBegin(); |
| 201 | 201 |
| (...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 916 ExtensionInstallPrompt::GetReEnablePromptTypeForExtension( | 916 ExtensionInstallPrompt::GetReEnablePromptTypeForExtension( |
| 917 service->profile(), extension()); | 917 service->profile(), extension()); |
| 918 client_->ShowDialog( | 918 client_->ShowDialog( |
| 919 base::Bind(&CrxInstaller::OnInstallPromptDone, this), extension(), | 919 base::Bind(&CrxInstaller::OnInstallPromptDone, this), extension(), |
| 920 nullptr, base::WrapUnique(new ExtensionInstallPrompt::Prompt(type)), | 920 nullptr, base::WrapUnique(new ExtensionInstallPrompt::Prompt(type)), |
| 921 ExtensionInstallPrompt::GetDefaultShowDialogCallback()); | 921 ExtensionInstallPrompt::GetDefaultShowDialogCallback()); |
| 922 } | 922 } |
| 923 } | 923 } |
| 924 | 924 |
| 925 } // namespace extensions | 925 } // namespace extensions |
| OLD | NEW |