Chromium Code Reviews| Index: chrome/browser/ui/search/search_tab_helper.cc |
| diff --git a/chrome/browser/ui/search/search_tab_helper.cc b/chrome/browser/ui/search/search_tab_helper.cc |
| index 1222b70056d0938f2e31524de141bbd512dbaadd..859c6af94a57d4a680d79231e2b7f26656df727e 100644 |
| --- a/chrome/browser/ui/search/search_tab_helper.cc |
| +++ b/chrome/browser/ui/search/search_tab_helper.cc |
| @@ -99,11 +99,12 @@ void SearchTabHelper::NavigateToPendingEntry( |
| if (!is_search_enabled_) |
| return; |
| - // NTP mode changes are initiated at "pending", all others are initiated |
| - // when "committed". This is because NTP is rendered natively so is faster |
| - // to render than the web contents and we need to coordinate the animations. |
| - if (IsNTP(url)) |
| - UpdateModelBasedOnURL(url); |
| +// TODO(samarth): check with Kuan that this is safe to remove. |
|
dhollowa
2013/01/10 18:50:29
I expect this is ok, but you'll need to change lin
samarth
2013/01/11 19:43:05
Done (I assume you meant line 118?). I've sent an
|
| +// // NTP mode changes are initiated at "pending", all others are initiated |
| +// // when "committed". This is because NTP is rendered natively so is faster |
| +// // to render than the web contents and we need to coordinate the animations. |
| +// if (IsNTP(url)) |
| +// UpdateModelBasedOnURL(url); |
| } |
| void SearchTabHelper::Observe( |
| @@ -114,9 +115,8 @@ void SearchTabHelper::Observe( |
| content::LoadCommittedDetails* committed_details = |
| content::Details<content::LoadCommittedDetails>(details).ptr(); |
| // See comment in |NavigateToPendingEntry()| about why |!IsNTP()| is used. |
| - if (!IsNTP(committed_details->entry->GetURL())) { |
| - UpdateModelBasedOnURL(committed_details->entry->GetURL()); |
| - } |
| + if (!IsNTP(committed_details->entry->GetVirtualURL())) |
| + UpdateModelBasedOnURL(committed_details->entry->GetVirtualURL()); |
| } |
| void SearchTabHelper::UpdateModelBasedOnURL(const GURL& url) { |