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

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

Issue 16295003: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 | 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_install_prompt.h" 5 #include "chrome/browser/extensions/extension_install_prompt.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 record_oauth2_grant_ = true; 671 record_oauth2_grant_ = true;
672 ShowConfirmation(); 672 ShowConfirmation();
673 } 673 }
674 674
675 void ExtensionInstallPrompt::OnMintTokenFailure( 675 void ExtensionInstallPrompt::OnMintTokenFailure(
676 const GoogleServiceAuthError& error) { 676 const GoogleServiceAuthError& error) {
677 ShowConfirmation(); 677 ShowConfirmation();
678 } 678 }
679 679
680 void ExtensionInstallPrompt::ShowConfirmation() { 680 void ExtensionInstallPrompt::ShowConfirmation() {
681 if (permissions_ && 681 if (permissions_.get() &&
682 (!extension_ || 682 (!extension_ ||
683 !extensions::PermissionsData::ShouldSkipPermissionWarnings( 683 !extensions::PermissionsData::ShouldSkipPermissionWarnings(
684 extension_))) { 684 extension_))) {
685 Manifest::Type extension_type = extension_ ? 685 Manifest::Type extension_type = extension_ ?
686 extension_->GetType() : Manifest::TYPE_UNKNOWN; 686 extension_->GetType() : Manifest::TYPE_UNKNOWN;
687 prompt_.SetPermissions(permissions_->GetWarningMessages(extension_type)); 687 prompt_.SetPermissions(permissions_->GetWarningMessages(extension_type));
688 } 688 }
689 689
690 switch (prompt_.type()) { 690 switch (prompt_.type()) {
691 case PERMISSIONS_PROMPT: 691 case PERMISSIONS_PROMPT:
(...skipping 16 matching lines...) Expand all
708 } 708 }
709 709
710 if (AutoConfirmPrompt(delegate_)) 710 if (AutoConfirmPrompt(delegate_))
711 return; 711 return;
712 712
713 if (show_dialog_callback_.is_null()) 713 if (show_dialog_callback_.is_null())
714 GetDefaultShowDialogCallback().Run(show_params_, delegate_, prompt_); 714 GetDefaultShowDialogCallback().Run(show_params_, delegate_, prompt_);
715 else 715 else
716 show_dialog_callback_.Run(show_params_, delegate_, prompt_); 716 show_dialog_callback_.Run(show_params_, delegate_, prompt_);
717 } 717 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_info_map_unittest.cc ('k') | chrome/browser/extensions/extension_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698