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

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

Issue 274943003: Create new histrograms for ExtensionPermission enum. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing. Created 6 years, 6 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 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 652
653 Release(); // balanced in ConfirmInstall() or ConfirmReEnable(). 653 Release(); // balanced in ConfirmInstall() or ConfirmReEnable().
654 } 654 }
655 655
656 void CrxInstaller::InstallUIAbort(bool user_initiated) { 656 void CrxInstaller::InstallUIAbort(bool user_initiated) {
657 // If update_from_settings_page_ boolean is true, this functions is 657 // If update_from_settings_page_ boolean is true, this functions is
658 // getting called in response to ExtensionInstallPrompt::ConfirmReEnable() 658 // getting called in response to ExtensionInstallPrompt::ConfirmReEnable()
659 // and if it is false, this function is called in response to 659 // and if it is false, this function is called in response to
660 // ExtensionInstallPrompt::ConfirmInstall(). 660 // ExtensionInstallPrompt::ConfirmInstall().
661 if (!update_from_settings_page_) { 661 if (!update_from_settings_page_) {
662 std::string histogram_name = user_initiated ? 662 std::string histogram_name = user_initiated
663 "Extensions.Permissions_InstallCancel" : 663 ? "Extensions.Permissions_InstallCancel2"
664 "Extensions.Permissions_InstallAbort"; 664 : "Extensions.Permissions_InstallAbort2";
665 ExtensionService::RecordPermissionMessagesHistogram( 665 ExtensionService::RecordPermissionMessagesHistogram(
666 extension(), histogram_name.c_str()); 666 extension(), histogram_name.c_str());
667 667
668 NotifyCrxInstallComplete(false); 668 NotifyCrxInstallComplete(false);
669 } 669 }
670 670
671 Release(); // balanced in ConfirmInstall() or ConfirmReEnable(). 671 Release(); // balanced in ConfirmInstall() or ConfirmReEnable().
672 672
673 // We're done. Since we don't post any more tasks to ourself, our ref count 673 // We're done. Since we don't post any more tasks to ourself, our ref count
674 // should go to zero and we die. The destructor will clean up the temp dir. 674 // should go to zero and we die. The destructor will clean up the temp dir.
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 if (!prefs->DidExtensionEscalatePermissions(extension()->id())) 907 if (!prefs->DidExtensionEscalatePermissions(extension()->id()))
908 return; 908 return;
909 909
910 if (client_) { 910 if (client_) {
911 AddRef(); // Balanced in InstallUIProceed() and InstallUIAbort(). 911 AddRef(); // Balanced in InstallUIProceed() and InstallUIAbort().
912 client_->ConfirmReEnable(this, extension()); 912 client_->ConfirmReEnable(this, extension());
913 } 913 }
914 } 914 }
915 915
916 } // namespace extensions 916 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698