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

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

Issue 10630021: Modify experimental identity flow to display scope descriptions and details. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 5 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 | Annotate | Revision Log
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 <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 AddRef(); // Balanced in Proceed or Abort. 99 AddRef(); // Balanced in Proceed or Abort.
100 100
101 install_ui_.reset(new ExtensionInstallPrompt(browser)); 101 install_ui_.reset(new ExtensionInstallPrompt(browser));
102 install_ui_->ConfirmReEnable(this, extension_); 102 install_ui_->ConfirmReEnable(this, extension_);
103 } 103 }
104 104
105 ExtensionDisabledDialogDelegate::~ExtensionDisabledDialogDelegate() { 105 ExtensionDisabledDialogDelegate::~ExtensionDisabledDialogDelegate() {
106 } 106 }
107 107
108 void ExtensionDisabledDialogDelegate::InstallUIProceed() { 108 void ExtensionDisabledDialogDelegate::InstallUIProceed() {
109 service_->GrantPermissionsAndEnableExtension(extension_); 109 service_->GrantPermissionsAndEnableExtension(
110 extension_, install_ui_->record_oauth2_grant());
110 Release(); 111 Release();
111 } 112 }
112 113
113 void ExtensionDisabledDialogDelegate::InstallUIAbort(bool user_initiated) { 114 void ExtensionDisabledDialogDelegate::InstallUIAbort(bool user_initiated) {
114 std::string histogram_name = user_initiated ? 115 std::string histogram_name = user_initiated ?
115 "Extensions.Permissions_ReEnableCancel" : 116 "Extensions.Permissions_ReEnableCancel" :
116 "Extensions.Permissions_ReEnableAbort"; 117 "Extensions.Permissions_ReEnableAbort";
117 ExtensionService::RecordPermissionMessagesHistogram( 118 ExtensionService::RecordPermissionMessagesHistogram(
118 extension_, histogram_name.c_str()); 119 extension_, histogram_name.c_str());
119 120
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 AddGlobalError(new ExtensionDisabledGlobalError(service, extension)); 318 AddGlobalError(new ExtensionDisabledGlobalError(service, extension));
318 } 319 }
319 320
320 void ShowExtensionDisabledDialog(ExtensionService* service, Browser* browser, 321 void ShowExtensionDisabledDialog(ExtensionService* service, Browser* browser,
321 const Extension* extension) { 322 const Extension* extension) {
322 // This object manages its own lifetime. 323 // This object manages its own lifetime.
323 new ExtensionDisabledDialogDelegate(browser, service, extension); 324 new ExtensionDisabledDialogDelegate(browser, service, extension);
324 } 325 }
325 326
326 } // namespace extensions 327 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/crx_installer_browsertest.cc ('k') | chrome/browser/extensions/extension_disabled_ui_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698