| 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 6b46fd73ec85d5d80e4576fbce15c79706d20139..d872214f7de079179de9011cd00df162d413373b 100644
|
| --- a/chrome/browser/ui/search/search_tab_helper.cc
|
| +++ b/chrome/browser/ui/search/search_tab_helper.cc
|
| @@ -6,6 +6,8 @@
|
|
|
| #include "chrome/browser/google/google_util.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| +#include "chrome/browser/search_engines/template_url_service.h"
|
| +#include "chrome/browser/search_engines/template_url_service_factory.h"
|
| #include "chrome/browser/ui/search/search.h"
|
| #include "chrome/common/url_constants.h"
|
| #include "content/public/browser/navigation_controller.h"
|
| @@ -99,6 +101,17 @@ void SearchTabHelper::Observe(
|
| !is_initial_navigation_commit_);
|
| }
|
| is_initial_navigation_commit_ = false;
|
| +
|
| + // Update the extracted search terms (if any) in the model.
|
| + Profile* profile =
|
| + Profile::FromBrowserContext(web_contents()->GetBrowserContext());
|
| + TemplateURLService* template_url_service =
|
| + TemplateURLServiceFactory::GetForProfile(profile);
|
| + string16 search_terms =
|
| + template_url_service->TryToExtractSearchTermsFromURL(
|
| + committed_details->entry->GetURL());
|
| + if (!search_terms.empty())
|
| + committed_details->entry->SetSearchTerms(search_terms);
|
| }
|
|
|
| void SearchTabHelper::UpdateModelBasedOnURL(const GURL& url, bool animate) {
|
|
|