| 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 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 | 659 |
| 660 Release(); // balanced in ConfirmInstall() or ConfirmReEnable(). | 660 Release(); // balanced in ConfirmInstall() or ConfirmReEnable(). |
| 661 } | 661 } |
| 662 | 662 |
| 663 void CrxInstaller::InstallUIAbort(bool user_initiated) { | 663 void CrxInstaller::InstallUIAbort(bool user_initiated) { |
| 664 // If update_from_settings_page_ boolean is true, this functions is | 664 // If update_from_settings_page_ boolean is true, this functions is |
| 665 // getting called in response to ExtensionInstallPrompt::ConfirmReEnable() | 665 // getting called in response to ExtensionInstallPrompt::ConfirmReEnable() |
| 666 // and if it is false, this function is called in response to | 666 // and if it is false, this function is called in response to |
| 667 // ExtensionInstallPrompt::ConfirmInstall(). | 667 // ExtensionInstallPrompt::ConfirmInstall(). |
| 668 if (!update_from_settings_page_) { | 668 if (!update_from_settings_page_) { |
| 669 std::string histogram_name = user_initiated | 669 std::string histogram_name = user_initiated ? "InstallCancel" |
| 670 ? "Extensions.Permissions_InstallCancel2" | 670 : "InstallAbort"; |
| 671 : "Extensions.Permissions_InstallAbort2"; | |
| 672 ExtensionService::RecordPermissionMessagesHistogram( | 671 ExtensionService::RecordPermissionMessagesHistogram( |
| 673 extension(), histogram_name.c_str()); | 672 extension(), histogram_name.c_str()); |
| 674 | 673 |
| 675 NotifyCrxInstallComplete(false); | 674 NotifyCrxInstallComplete(false); |
| 676 } | 675 } |
| 677 | 676 |
| 678 Release(); // balanced in ConfirmInstall() or ConfirmReEnable(). | 677 Release(); // balanced in ConfirmInstall() or ConfirmReEnable(). |
| 679 | 678 |
| 680 // We're done. Since we don't post any more tasks to ourself, our ref count | 679 // We're done. Since we don't post any more tasks to ourself, our ref count |
| 681 // should go to zero and we die. The destructor will clean up the temp dir. | 680 // should go to zero and we die. The destructor will clean up the temp dir. |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 908 if (!prefs->DidExtensionEscalatePermissions(extension()->id())) | 907 if (!prefs->DidExtensionEscalatePermissions(extension()->id())) |
| 909 return; | 908 return; |
| 910 | 909 |
| 911 if (client_) { | 910 if (client_) { |
| 912 AddRef(); // Balanced in InstallUIProceed() and InstallUIAbort(). | 911 AddRef(); // Balanced in InstallUIProceed() and InstallUIAbort(). |
| 913 client_->ConfirmReEnable(this, extension()); | 912 client_->ConfirmReEnable(this, extension()); |
| 914 } | 913 } |
| 915 } | 914 } |
| 916 | 915 |
| 917 } // namespace extensions | 916 } // namespace extensions |
| OLD | NEW |