Chromium Code Reviews| Index: chrome/browser/infobars/infobar_delegate.cc |
| diff --git a/chrome/browser/infobars/infobar_delegate.cc b/chrome/browser/infobars/infobar_delegate.cc |
| index db645f2524814effb83aa45db411720550ed346b..e733f4390fe779305de4036c3fc476749db72aed 100644 |
| --- a/chrome/browser/infobars/infobar_delegate.cc |
| +++ b/chrome/browser/infobars/infobar_delegate.cc |
| @@ -95,9 +95,13 @@ TranslateInfoBarDelegate* InfoBarDelegate::AsTranslateInfoBarDelegate() { |
| } |
| void InfoBarDelegate::StoreActiveEntryUniqueID() { |
| - DCHECK(web_contents()); |
| + // TODO(droger): Remove this dependency on InfoBarService, see |
| + // http://crbug.com/354379. |
| + content::WebContents* web_contents = |
| + InfoBarService::WebContentsFromInfoBar(infobar()); |
|
blundell
2014/04/09 12:35:12
How much larger would it make this CL to change th
droger
2014/04/09 12:44:06
Not very large, but it will touch more files (Info
droger
2014/04/09 13:22:54
This looks like this:
https://codereview.chromium.
|
| + DCHECK(web_contents); |
| NavigationEntry* active_entry = |
| - web_contents()->GetController().GetActiveEntry(); |
| + web_contents->GetController().GetActiveEntry(); |
| contents_unique_id_ = active_entry ? active_entry->GetUniqueID() : 0; |
| } |
| @@ -107,10 +111,6 @@ gfx::Image InfoBarDelegate::GetIcon() const { |
| ResourceBundle::GetSharedInstance().GetNativeImageNamed(icon_id); |
| } |
| -content::WebContents* InfoBarDelegate::web_contents() { |
| - return InfoBarService::WebContentsFromInfoBar(infobar_); |
| -} |
| - |
| InfoBarDelegate::InfoBarDelegate() : contents_unique_id_(0) { |
| } |