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

Side by Side Diff: chrome/browser/extensions/extension_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/extensions/extension_infobar_delegate.h" 5 #include "chrome/browser/extensions/extension_infobar_delegate.h"
6 6
7 #include "chrome/browser/extensions/extension_host.h" 7 #include "chrome/browser/extensions/extension_host.h"
8 #include "chrome/browser/extensions/extension_process_manager.h" 8 #include "chrome/browser/extensions/extension_process_manager.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 // Only allow one InfoBar at a time per extension. 53 // Only allow one InfoBar at a time per extension.
54 return extension_delegate->extension_host()->extension() == 54 return extension_delegate->extension_host()->extension() ==
55 extension_host_->extension(); 55 extension_host_->extension();
56 } 56 }
57 57
58 void ExtensionInfoBarDelegate::InfoBarDismissed() { 58 void ExtensionInfoBarDelegate::InfoBarDismissed() {
59 closing_ = true; 59 closing_ = true;
60 } 60 }
61 61
62 void ExtensionInfoBarDelegate::InfoBarClosed() {
63 delete this;
64 }
65
66 InfoBarDelegate::Type ExtensionInfoBarDelegate::GetInfoBarType() const { 62 InfoBarDelegate::Type ExtensionInfoBarDelegate::GetInfoBarType() const {
67 return PAGE_ACTION_TYPE; 63 return PAGE_ACTION_TYPE;
68 } 64 }
69 65
70 ExtensionInfoBarDelegate* 66 ExtensionInfoBarDelegate*
71 ExtensionInfoBarDelegate::AsExtensionInfoBarDelegate() { 67 ExtensionInfoBarDelegate::AsExtensionInfoBarDelegate() {
72 return this; 68 return this;
73 } 69 }
74 70
75 void ExtensionInfoBarDelegate::Observe(NotificationType type, 71 void ExtensionInfoBarDelegate::Observe(NotificationType type,
(...skipping 12 matching lines...) Expand all
88 if (extension_ == extension) 84 if (extension_ == extension)
89 tab_contents_->RemoveInfoBar(this); 85 tab_contents_->RemoveInfoBar(this);
90 break; 86 break;
91 } 87 }
92 default: { 88 default: {
93 NOTREACHED() << "Unknown message"; 89 NOTREACHED() << "Unknown message";
94 break; 90 break;
95 } 91 }
96 } 92 }
97 } 93 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_infobar_delegate.h ('k') | chrome/browser/extensions/theme_installed_infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698