summaryrefslogtreecommitdiffstats
path: root/chrome/browser/alternate_nav_url_fetcher.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/alternate_nav_url_fetcher.cc')
-rw-r--r--chrome/browser/alternate_nav_url_fetcher.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/chrome/browser/alternate_nav_url_fetcher.cc b/chrome/browser/alternate_nav_url_fetcher.cc
index 6c583d2..d2bf6f1 100644
--- a/chrome/browser/alternate_nav_url_fetcher.cc
+++ b/chrome/browser/alternate_nav_url_fetcher.cc
@@ -22,6 +22,7 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
+using content::NavigationController;
using content::OpenURLParams;
using content::Referrer;
@@ -119,15 +120,15 @@ void AlternateNavURLFetcher::Observe(
// If we've already received a notification for the same controller, we
// should delete ourselves as that indicates that the page is being
// re-loaded so this instance is now stale.
- content::NavigationController* controller =
- content::Source<content::NavigationController>(source).ptr();
+ NavigationController* controller =
+ content::Source<NavigationController>(source).ptr();
if (controller_ == controller) {
delete this;
} else if (!controller_) {
// Start listening for the commit notification.
DCHECK(controller->GetPendingEntry());
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- content::Source<content::NavigationController>(
+ content::Source<NavigationController>(
controller));
StartFetch(controller);
}
@@ -136,7 +137,7 @@ void AlternateNavURLFetcher::Observe(
case chrome::NOTIFICATION_INSTANT_COMMITTED: {
// See above.
- content::NavigationController* controller =
+ NavigationController* controller =
&content::Source<TabContentsWrapper>(source)->
web_contents()->GetController();
if (controller_ == controller) {
@@ -151,8 +152,7 @@ void AlternateNavURLFetcher::Observe(
case content::NOTIFICATION_NAV_ENTRY_COMMITTED:
// The page was navigated, we can show the infobar now if necessary.
registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- content::Source<content::NavigationController>(
- controller_));
+ content::Source<NavigationController>(controller_));
navigated_to_entry_ = true;
ShowInfobarIfPossible();
// WARNING: |this| may be deleted!
@@ -179,11 +179,10 @@ void AlternateNavURLFetcher::OnURLFetchComplete(
// WARNING: |this| may be deleted!
}
-void AlternateNavURLFetcher::StartFetch(
- content::NavigationController* controller) {
+void AlternateNavURLFetcher::StartFetch(NavigationController* controller) {
controller_ = controller;
registrar_.Add(this, content::NOTIFICATION_TAB_CLOSED,
- content::Source<content::NavigationController>(controller_));
+ content::Source<NavigationController>(controller_));
DCHECK_EQ(NOT_STARTED, state_);
state_ = IN_PROGRESS;