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

Unified Diff: chrome/browser/google/google_url_tracker.h

Issue 283413002: Turn GoogleURLTrackerNavigationHelper(Impl) into a per-tab object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Response to review Created 6 years, 7 months 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
Index: chrome/browser/google/google_url_tracker.h
diff --git a/chrome/browser/google/google_url_tracker.h b/chrome/browser/google/google_url_tracker.h
index 7499dd4577512b50f3920e4292035e44bd0bea7d..b26458834c956fd5de5037f1e663041ccc47a1a0 100644
--- a/chrome/browser/google/google_url_tracker.h
+++ b/chrome/browser/google/google_url_tracker.h
@@ -25,10 +25,6 @@ class GoogleURLTrackerNavigationHelper;
class PrefService;
class Profile;
-namespace content {
-class NavigationController;
-}
-
namespace infobars {
class InfoBar;
}
@@ -65,7 +61,6 @@ class GoogleURLTracker : public net::URLFetcherDelegate,
// GoogleURLTrackerFactory::GetForProfile().
GoogleURLTracker(Profile* profile,
scoped_ptr<GoogleURLTrackerClient> client,
- scoped_ptr<GoogleURLTrackerNavigationHelper> nav_helper,
Mode mode);
virtual ~GoogleURLTracker();
@@ -106,14 +101,14 @@ class GoogleURLTracker : public net::URLFetcherDelegate,
// Called by the client after SearchCommitted() registers listeners, to
// indicate that we've received the "load now pending" notification.
- // |navigation_controller| is the NavigationController for this load;
- // |infobar_service| is the InfoBarService of the associated tab; and
- // |pending_id| is the unique ID of the newly pending NavigationEntry. If
- // there is already a visible GoogleURLTracker infobar for this tab, this
+ // |nav_helper| is the GoogleURLTrackerNavigationHelper associated with this
+ // navigation; |infobar_service| is the InfoBarService of the associated tab;
+ // and |pending_id| is the unique ID of the newly pending NavigationEntry.
+ // If there is already a visible GoogleURLTracker infobar for this tab, this
// function resets its associated pending entry ID to the new ID. Otherwise
// this function creates a map entry for the associated tab.
virtual void OnNavigationPending(
- content::NavigationController* navigation_controller,
+ scoped_ptr<GoogleURLTrackerNavigationHelper> nav_helper,
InfoBarService* infobar_service,
int pending_id);
@@ -124,8 +119,7 @@ class GoogleURLTracker : public net::URLFetcherDelegate,
const GURL& search_url);
// Called by the navigation observer when a tab closes.
- virtual void OnTabClosed(
- content::NavigationController* navigation_controller);
+ virtual void OnTabClosed(GoogleURLTrackerNavigationHelper* nav_helper);
static const char kDefaultGoogleHomepage[];
static const char kSearchDomainCheckURL[];
@@ -167,22 +161,20 @@ class GoogleURLTracker : public net::URLFetcherDelegate,
// Google TLD.
void CloseAllEntries(bool redo_searches);
- // Unregisters any listeners for the navigation controller in |map_entry|.
+ // Unregisters any listeners for the navigation helper in |map_entry|.
// This sanity-DCHECKs that these are registered (or not) in the specific
// cases we expect. (|must_be_listening_for_commit| is used purely for this
// sanity-checking.) This also unregisters the global navigation pending
// listener if there are no remaining listeners for navigation commits, as we
// no longer need them until another search is committed.
void UnregisterForEntrySpecificNotifications(
- const GoogleURLTrackerMapEntry& map_entry,
+ GoogleURLTrackerMapEntry* map_entry,
bool must_be_listening_for_commit);
Profile* profile_;
scoped_ptr<GoogleURLTrackerClient> client_;
- scoped_ptr<GoogleURLTrackerNavigationHelper> nav_helper_;
-
// Creates an infobar and adds it to the provided InfoBarService. Returns the
// infobar on success or NULL on failure. The caller does not own the
// returned object, the InfoBarService does.

Powered by Google App Engine
This is Rietveld 408576698