| 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 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 908 | 908 |
| 909 ExtensionPrefs* prefs = ExtensionPrefs::Get(service->profile()); | 909 ExtensionPrefs* prefs = ExtensionPrefs::Get(service->profile()); |
| 910 if (!prefs->DidExtensionEscalatePermissions(extension()->id())) | 910 if (!prefs->DidExtensionEscalatePermissions(extension()->id())) |
| 911 return; | 911 return; |
| 912 | 912 |
| 913 if (client_) { | 913 if (client_) { |
| 914 AddRef(); // Balanced in OnInstallPromptDone(). | 914 AddRef(); // Balanced in OnInstallPromptDone(). |
| 915 ExtensionInstallPrompt::PromptType type = | 915 ExtensionInstallPrompt::PromptType type = |
| 916 ExtensionInstallPrompt::GetReEnablePromptTypeForExtension( | 916 ExtensionInstallPrompt::GetReEnablePromptTypeForExtension( |
| 917 service->profile(), extension()); | 917 service->profile(), extension()); |
| 918 client_->ShowDialog( | 918 client_->ShowDialog(base::Bind(&CrxInstaller::OnInstallPromptDone, this), |
| 919 base::Bind(&CrxInstaller::OnInstallPromptDone, this), extension(), | 919 extension(), nullptr, |
| 920 nullptr, base::WrapUnique(new ExtensionInstallPrompt::Prompt(type)), | 920 base::MakeUnique<ExtensionInstallPrompt::Prompt>(type), |
| 921 ExtensionInstallPrompt::GetDefaultShowDialogCallback()); | 921 ExtensionInstallPrompt::GetDefaultShowDialogCallback()); |
| 922 } | 922 } |
| 923 } | 923 } |
| 924 | 924 |
| 925 } // namespace extensions | 925 } // namespace extensions |
| OLD | NEW |