| Index: chrome/browser/ui/search/search_model.cc
|
| diff --git a/chrome/browser/ui/search/search_model.cc b/chrome/browser/ui/search/search_model.cc
|
| index c8582a8d0b4875f141925be7cddd32f23f21e0a4..9fb8bdc7cbf170edcbcf6a96b6891a65da5ba312 100644
|
| --- a/chrome/browser/ui/search/search_model.cc
|
| +++ b/chrome/browser/ui/search/search_model.cc
|
| @@ -4,25 +4,28 @@
|
|
|
| #include "chrome/browser/ui/search/search_model.h"
|
|
|
| +#include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/ui/search/search.h"
|
| #include "chrome/browser/ui/search/search_model_observer.h"
|
| -#include "chrome/browser/ui/tab_contents/tab_contents.h"
|
| +#include "content/public/browser/web_contents.h"
|
|
|
| namespace chrome {
|
| namespace search {
|
|
|
| -SearchModel::SearchModel(TabContents* contents)
|
| - : contents_(contents) {
|
| +SearchModel::SearchModel(content::WebContents* web_contents)
|
| + : web_contents_(web_contents) {
|
| }
|
|
|
| SearchModel::~SearchModel() {
|
| }
|
|
|
| void SearchModel::SetMode(const Mode& new_mode) {
|
| - if (!contents_)
|
| + if (!web_contents_)
|
| return;
|
|
|
| - DCHECK(IsInstantExtendedAPIEnabled(contents_->profile()))
|
| + Profile* profile =
|
| + Profile::FromBrowserContext(web_contents_->GetBrowserContext());
|
| + DCHECK(IsInstantExtendedAPIEnabled(profile))
|
| << "Please do not try to set the SearchModel mode without first "
|
| << "checking if Search is enabled.";
|
|
|
|
|