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

Side by Side Diff: chrome/browser/extensions/extension_disabled_ui.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/extension_disabled_ui.h" 5 #include "chrome/browser/extensions/extension_disabled_ui.h"
6 6
7 #include <bitset> 7 #include <bitset>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 ExtensionDisabledDialogDelegate::~ExtensionDisabledDialogDelegate() { 121 ExtensionDisabledDialogDelegate::~ExtensionDisabledDialogDelegate() {
122 } 122 }
123 123
124 void ExtensionDisabledDialogDelegate::InstallUIProceed() { 124 void ExtensionDisabledDialogDelegate::InstallUIProceed() {
125 service_->GrantPermissionsAndEnableExtension(extension_); 125 service_->GrantPermissionsAndEnableExtension(extension_);
126 Release(); 126 Release();
127 } 127 }
128 128
129 void ExtensionDisabledDialogDelegate::InstallUIAbort(bool user_initiated) { 129 void ExtensionDisabledDialogDelegate::InstallUIAbort(bool user_initiated) {
130 std::string histogram_name = user_initiated ? 130 std::string histogram_name = user_initiated
131 "Extensions.Permissions_ReEnableCancel" : 131 ? "Extensions.Permissions_ReEnableCancel2"
132 "Extensions.Permissions_ReEnableAbort"; 132 : "Extensions.Permissions_ReEnableAbort2";
133 ExtensionService::RecordPermissionMessagesHistogram( 133 ExtensionService::RecordPermissionMessagesHistogram(
134 extension_, histogram_name.c_str()); 134 extension_, histogram_name.c_str());
135 135
136 // Do nothing. The extension will remain disabled. 136 // Do nothing. The extension will remain disabled.
137 Release(); 137 Release();
138 } 138 }
139 139
140 // ExtensionDisabledGlobalError ----------------------------------------------- 140 // ExtensionDisabledGlobalError -----------------------------------------------
141 141
142 class ExtensionDisabledGlobalError : public GlobalErrorWithStandardBubble, 142 class ExtensionDisabledGlobalError : public GlobalErrorWithStandardBubble,
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 void ShowExtensionDisabledDialog(ExtensionService* service, 421 void ShowExtensionDisabledDialog(ExtensionService* service,
422 content::WebContents* web_contents, 422 content::WebContents* web_contents,
423 const Extension* extension) { 423 const Extension* extension) {
424 scoped_ptr<ExtensionInstallPrompt> install_ui( 424 scoped_ptr<ExtensionInstallPrompt> install_ui(
425 new ExtensionInstallPrompt(web_contents)); 425 new ExtensionInstallPrompt(web_contents));
426 // This object manages its own lifetime. 426 // This object manages its own lifetime.
427 new ExtensionDisabledDialogDelegate(service, install_ui.Pass(), extension); 427 new ExtensionDisabledDialogDelegate(service, install_ui.Pass(), extension);
428 } 428 }
429 429
430 } // namespace extensions 430 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/crx_installer.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698