Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: chrome/browser/extensions/crx_installer.cc

Issue 1094873002: Extensions: Switch to new permission message system, part V (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 const char* 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);
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.
682 } 681 }
683 682
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698