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

Unified Diff: chrome/browser/alternate_nav_url_fetcher.cc

Issue 8983012: Get rid of content::NavigationController in cc file and use "using" instead. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 12 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
« no previous file with comments | « no previous file | chrome/browser/automation/automation_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/alternate_nav_url_fetcher.cc
===================================================================
--- chrome/browser/alternate_nav_url_fetcher.cc (revision 116288)
+++ chrome/browser/alternate_nav_url_fetcher.cc (working copy)
@@ -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 @@
// 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 @@
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 @@
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 @@
// 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;
« no previous file with comments | « no previous file | chrome/browser/automation/automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698