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

Side by Side Diff: chrome/browser/extensions/extension_disabled_ui.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/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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 ExtensionDisabledDialogDelegate::~ExtensionDisabledDialogDelegate() { 122 ExtensionDisabledDialogDelegate::~ExtensionDisabledDialogDelegate() {
123 } 123 }
124 124
125 void ExtensionDisabledDialogDelegate::InstallUIProceed() { 125 void ExtensionDisabledDialogDelegate::InstallUIProceed() {
126 service_->GrantPermissionsAndEnableExtension(extension_); 126 service_->GrantPermissionsAndEnableExtension(extension_);
127 Release(); 127 Release();
128 } 128 }
129 129
130 void ExtensionDisabledDialogDelegate::InstallUIAbort(bool user_initiated) { 130 void ExtensionDisabledDialogDelegate::InstallUIAbort(bool user_initiated) {
131 std::string histogram_name = user_initiated 131 std::string histogram_name = user_initiated ? "ReEnableCancel"
132 ? "Extensions.Permissions_ReEnableCancel2" 132 : "ReEnableAbort";
133 : "Extensions.Permissions_ReEnableAbort2";
134 ExtensionService::RecordPermissionMessagesHistogram( 133 ExtensionService::RecordPermissionMessagesHistogram(
135 extension_, histogram_name.c_str()); 134 extension_, histogram_name.c_str());
136 135
137 // Do nothing. The extension will remain disabled. 136 // Do nothing. The extension will remain disabled.
138 Release(); 137 Release();
139 } 138 }
140 139
141 // ExtensionDisabledGlobalError ----------------------------------------------- 140 // ExtensionDisabledGlobalError -----------------------------------------------
142 141
143 class ExtensionDisabledGlobalError 142 class ExtensionDisabledGlobalError
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 void ShowExtensionDisabledDialog(ExtensionService* service, 454 void ShowExtensionDisabledDialog(ExtensionService* service,
456 content::WebContents* web_contents, 455 content::WebContents* web_contents,
457 const Extension* extension) { 456 const Extension* extension) {
458 scoped_ptr<ExtensionInstallPrompt> install_ui( 457 scoped_ptr<ExtensionInstallPrompt> install_ui(
459 new ExtensionInstallPrompt(web_contents)); 458 new ExtensionInstallPrompt(web_contents));
460 // This object manages its own lifetime. 459 // This object manages its own lifetime.
461 new ExtensionDisabledDialogDelegate(service, install_ui.Pass(), extension); 460 new ExtensionDisabledDialogDelegate(service, install_ui.Pass(), extension);
462 } 461 }
463 462
464 } // namespace extensions 463 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698