| Index: chrome/browser/google/google_url_tracker_infobar_delegate.cc
|
| diff --git a/chrome/browser/google/google_url_tracker_infobar_delegate.cc b/chrome/browser/google/google_url_tracker_infobar_delegate.cc
|
| index 0b2036c9eb3d9e8f4f3b3dac3379f37f1a54cd88..d9fc927ec38dda1ced539588af581986f7a74cf6 100644
|
| --- a/chrome/browser/google/google_url_tracker_infobar_delegate.cc
|
| +++ b/chrome/browser/google/google_url_tracker_infobar_delegate.cc
|
| @@ -24,7 +24,7 @@ InfoBar* GoogleURLTrackerInfoBarDelegate::Create(
|
| const GURL& search_url) {
|
| return infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
|
| scoped_ptr<ConfirmInfoBarDelegate>(new GoogleURLTrackerInfoBarDelegate(
|
| - google_url_tracker, search_url))));
|
| + infobar_service->web_contents(), google_url_tracker, search_url))));
|
| }
|
|
|
| bool GoogleURLTrackerInfoBarDelegate::Accept() {
|
| @@ -38,7 +38,10 @@ bool GoogleURLTrackerInfoBarDelegate::Cancel() {
|
| }
|
|
|
| void GoogleURLTrackerInfoBarDelegate::Update(const GURL& search_url) {
|
| - StoreActiveEntryUniqueID();
|
| + content::NavigationEntry* active_entry =
|
| + web_contents()->GetController().GetActiveEntry();
|
| + int entry_id = active_entry ? active_entry->GetUniqueID() : 0;
|
| + StoreActiveEntryUniqueID(entry_id);
|
| search_url_ = search_url;
|
| pending_id_ = 0;
|
| }
|
| @@ -71,13 +74,13 @@ void GoogleURLTrackerInfoBarDelegate::Close(bool redo_search) {
|
| }
|
|
|
| GoogleURLTrackerInfoBarDelegate::GoogleURLTrackerInfoBarDelegate(
|
| + content::WebContents* web_contents,
|
| GoogleURLTracker* google_url_tracker,
|
| const GURL& search_url)
|
| - : ConfirmInfoBarDelegate(),
|
| + : ContentConfirmInfoBarDelegate(web_contents),
|
| google_url_tracker_(google_url_tracker),
|
| search_url_(search_url),
|
| - pending_id_(0) {
|
| -}
|
| + pending_id_(0) {}
|
|
|
| GoogleURLTrackerInfoBarDelegate::~GoogleURLTrackerInfoBarDelegate() {
|
| }
|
| @@ -118,7 +121,7 @@ bool GoogleURLTrackerInfoBarDelegate::LinkClicked(
|
| }
|
|
|
| bool GoogleURLTrackerInfoBarDelegate::ShouldExpireInternal(
|
| - const content::LoadCommittedDetails& details) const {
|
| - int unique_id = details.entry->GetUniqueID();
|
| - return (unique_id != contents_unique_id()) && (unique_id != pending_id_);
|
| + const NavigationDetails& details) const {
|
| + return (details.entry_id != contents_unique_id()) &&
|
| + (details.entry_id != pending_id_);
|
| }
|
|
|