Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(447)

Unified Diff: chrome/browser/omnibox_search_hint.cc

Issue 8892011: Clean up TCW, make it solely a hub for 1:1 observer/helper objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/instant/instant_loader.cc ('k') | chrome/browser/password_manager_delegate_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/omnibox_search_hint.cc
diff --git a/chrome/browser/omnibox_search_hint.cc b/chrome/browser/omnibox_search_hint.cc
index 859a924492b24152cb0a5f5dd4beb041b98ff580..bded9c01895497f59c23f05ac58de179752833c2 100644
--- a/chrome/browser/omnibox_search_hint.cc
+++ b/chrome/browser/omnibox_search_hint.cc
@@ -8,8 +8,6 @@
#include "base/message_loop.h"
#include "base/metrics/histogram.h"
#include "base/task.h"
-// TODO(avi): remove when conversions not needed any more
-#include "base/utf_string_conversions.h"
#include "chrome/browser/autocomplete/autocomplete.h"
#include "chrome/browser/autocomplete/autocomplete_edit.h"
#include "chrome/browser/autocomplete/autocomplete_match.h"
@@ -29,6 +27,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "content/browser/tab_contents/navigation_details.h"
+#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
@@ -150,7 +149,7 @@ bool HintInfoBar::Accept() {
// OmniboxSearchHint ----------------------------------------------------------
OmniboxSearchHint::OmniboxSearchHint(TabContentsWrapper* tab) : tab_(tab) {
- NavigationController* controller = &(tab->controller());
+ NavigationController* controller = &(tab->tab_contents()->controller());
notification_registrar_.Add(
this,
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
@@ -172,7 +171,8 @@ void OmniboxSearchHint::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED) {
- NavigationEntry* entry = tab_->controller().GetActiveEntry();
+ NavigationEntry* entry =
+ tab_->tab_contents()->controller().GetActiveEntry();
if (search_engine_urls_.find(entry->url().spec()) ==
search_engine_urls_.end()) {
// The search engine is not in our white-list, bail.
« no previous file with comments | « chrome/browser/instant/instant_loader.cc ('k') | chrome/browser/password_manager_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698