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

Side by Side Diff: chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc

Issue 6926001: Replace the virtual InfoBarDelegate::InfoBarClosed() function with a non-virtual one. This is a ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/custom_handlers/register_protocol_handler_infobar_deleg ate.h" 5 #include "chrome/browser/custom_handlers/register_protocol_handler_infobar_deleg ate.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/custom_handlers/protocol_handler.h" 8 #include "chrome/browser/custom_handlers/protocol_handler.h"
9 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" 9 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
10 #include "grit/generated_resources.h" 10 #include "grit/generated_resources.h"
(...skipping 10 matching lines...) Expand all
21 } 21 }
22 22
23 bool RegisterProtocolHandlerInfoBarDelegate::ShouldExpire( 23 bool RegisterProtocolHandlerInfoBarDelegate::ShouldExpire(
24 const NavigationController::LoadCommittedDetails& details) const { 24 const NavigationController::LoadCommittedDetails& details) const {
25 // The user has submitted a form, causing the page to navigate elsewhere. We 25 // The user has submitted a form, causing the page to navigate elsewhere. We
26 // don't want the infobar to be expired at this point, because the user won't 26 // don't want the infobar to be expired at this point, because the user won't
27 // get a chance to answer the question. 27 // get a chance to answer the question.
28 return false; 28 return false;
29 } 29 }
30 30
31 void RegisterProtocolHandlerInfoBarDelegate::InfoBarClosed() {
32 delete this;
33 }
34
35 InfoBarDelegate::Type 31 InfoBarDelegate::Type
36 RegisterProtocolHandlerInfoBarDelegate::GetInfoBarType() const { 32 RegisterProtocolHandlerInfoBarDelegate::GetInfoBarType() const {
37 return PAGE_ACTION_TYPE; 33 return PAGE_ACTION_TYPE;
38 } 34 }
39 35
40 string16 RegisterProtocolHandlerInfoBarDelegate::GetMessageText() const { 36 string16 RegisterProtocolHandlerInfoBarDelegate::GetMessageText() const {
41 ProtocolHandler* old_handler = registry_->GetHandlerFor(handler_->protocol()); 37 ProtocolHandler* old_handler = registry_->GetHandlerFor(handler_->protocol());
42 return old_handler ? 38 return old_handler ?
43 l10n_util::GetStringFUTF16(IDS_REGISTER_PROTOCOL_HANDLER_CONFIRM_REPLACE, 39 l10n_util::GetStringFUTF16(IDS_REGISTER_PROTOCOL_HANDLER_CONFIRM_REPLACE,
44 handler_->title(), UTF8ToUTF16(handler_->url().host()), 40 handler_->title(), UTF8ToUTF16(handler_->url().host()),
(...skipping 23 matching lines...) Expand all
68 64
69 string16 RegisterProtocolHandlerInfoBarDelegate::GetLinkText() { 65 string16 RegisterProtocolHandlerInfoBarDelegate::GetLinkText() {
70 // TODO(koz): Make this a 'learn more' link. 66 // TODO(koz): Make this a 'learn more' link.
71 return string16(); 67 return string16();
72 } 68 }
73 69
74 bool RegisterProtocolHandlerInfoBarDelegate::LinkClicked( 70 bool RegisterProtocolHandlerInfoBarDelegate::LinkClicked(
75 WindowOpenDisposition disposition) { 71 WindowOpenDisposition disposition) {
76 return false; 72 return false;
77 } 73 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698