summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-28 21:04:23 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-28 21:04:23 +0000
commit10f417c53722348c4452dc22e1a0dd18c0e4b140 (patch)
tree470c5574d9d2ef9c7ba62951868149e70169b1a5 /chrome/browser
parenta47fccd356705a7d92cc83b03150c9782167f8c4 (diff)
downloadchromium_src-10f417c53722348c4452dc22e1a0dd18c0e4b140.zip
chromium_src-10f417c53722348c4452dc22e1a0dd18c0e4b140.tar.gz
chromium_src-10f417c53722348c4452dc22e1a0dd18c0e4b140.tar.bz2
Rename NavigationController to NavigationControllerImpl and put it into the content namespace. Also make all users of content::NavigationController interface use the "using" keyword so they don't have to put content:: everywhere (similar to other Content API and WebKit API classes).
BUG=98716 TBR=joi Review URL: http://codereview.chromium.org/8956059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115916 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/DEPS2
-rw-r--r--chrome/browser/automation/testing_automation_provider.cc11
-rw-r--r--chrome/browser/content_settings/tab_specific_content_settings.cc3
-rw-r--r--chrome/browser/debugger/devtools_window.cc3
-rw-r--r--chrome/browser/download/download_request_limiter.cc5
-rw-r--r--chrome/browser/extensions/extension_navigation_observer.cc4
-rw-r--r--chrome/browser/extensions/extension_page_actions_module.cc4
-rw-r--r--chrome/browser/extensions/extension_tab_util.cc4
-rw-r--r--chrome/browser/extensions/extension_tabs_module.cc4
-rw-r--r--chrome/browser/extensions/extension_url_rewrite_browsertest.cc4
-rw-r--r--chrome/browser/external_tab_container_win.cc3
-rw-r--r--chrome/browser/favicon/favicon_handler.cc18
-rw-r--r--chrome/browser/favicon/favicon_handler.h1
-rw-r--r--chrome/browser/favicon/favicon_handler_unittest.cc10
-rw-r--r--chrome/browser/favicon/favicon_tab_helper.cc10
-rw-r--r--chrome/browser/favicon/favicon_tab_helper.h1
-rw-r--r--chrome/browser/geolocation/chrome_geolocation_permission_context.cc3
-rw-r--r--chrome/browser/geolocation/geolocation_settings_state_unittest.cc7
-rw-r--r--chrome/browser/history/history_tab_helper.cc5
-rw-r--r--chrome/browser/infobars/infobar_delegate.cc4
-rw-r--r--chrome/browser/instant/instant_loader.cc8
-rw-r--r--chrome/browser/memory_details.cc5
-rw-r--r--chrome/browser/omnibox_search_hint.cc4
-rw-r--r--chrome/browser/printing/print_dialog_cloud.cc3
-rw-r--r--chrome/browser/rlz/rlz.cc5
-rw-r--r--chrome/browser/rlz/rlz_unittest.cc13
-rw-r--r--chrome/browser/safe_browsing/browser_feature_extractor.cc5
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_host.cc3
-rw-r--r--chrome/browser/safe_browsing/malware_details.cc4
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc4
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service.cc4
-rw-r--r--chrome/browser/sessions/base_session_service.cc5
-rw-r--r--chrome/browser/sessions/session_service.cc5
-rw-r--r--chrome/browser/sessions/session_service_unittest.cc5
-rw-r--r--chrome/browser/sessions/session_types.cc11
-rw-r--r--chrome/browser/sessions/tab_restore_service.cc5
-rw-r--r--chrome/browser/sessions/tab_restore_service_browsertest.cc5
-rw-r--r--chrome/browser/ssl/ssl_blocking_page.cc4
-rw-r--r--chrome/browser/ssl/ssl_browser_tests.cc21
-rw-r--r--chrome/browser/sync/glue/session_model_associator.cc9
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu.cc5
-rw-r--r--chrome/browser/tabs/pinned_tab_codec.cc4
-rw-r--r--chrome/browser/tabs/tab_finder.cc3
-rw-r--r--chrome/browser/tabs/tab_strip_model.cc8
-rw-r--r--chrome/browser/translate/options_menu_model.cc3
-rw-r--r--chrome/browser/translate/translate_infobar_delegate.cc4
-rw-r--r--chrome/browser/translate/translate_manager.cc15
-rw-r--r--chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc4
-rw-r--r--chrome/browser/ui/browser.cc25
-rw-r--r--chrome/browser/ui/browser_browsertest.cc5
-rw-r--r--chrome/browser/ui/cocoa/applescript/tab_applescript.mm9
-rw-r--r--chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm4
-rw-r--r--chrome/browser/ui/gtk/location_bar_view_gtk.cc3
-rw-r--r--chrome/browser/ui/search_engines/search_engine_tab_helper.cc9
-rw-r--r--chrome/browser/ui/sync/tab_contents_wrapper_synced_tab_delegate.cc11
-rw-r--r--chrome/browser/ui/toolbar/back_forward_menu_model.cc15
-rw-r--r--chrome/browser/ui/toolbar/toolbar_model.cc8
-rw-r--r--chrome/browser/ui/views/location_bar/click_handler.cc4
-rw-r--r--chrome/browser/ui/webui/cloud_print_signin_dialog.cc3
-rw-r--r--chrome/browser/ui/webui/print_preview_handler.cc3
60 files changed, 214 insertions, 165 deletions
diff --git a/chrome/browser/DEPS b/chrome/browser/DEPS
index 39ebd84..aa8a766 100644
--- a/chrome/browser/DEPS
+++ b/chrome/browser/DEPS
@@ -30,7 +30,7 @@ include_rules = [
# TODO(jam): this needs to be removed, and only use content/public. BUG=98716
"+content/browser",
"-content/browser/notification_service_impl.h",
- "-content/browser/tab_contents/navigation_entry.h",
+ "-content/browser/tab_contents/navigation_entry_impl.h",
"-content/browser/plugin_service_impl.h",
"-content/common",
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index 6282a55..f4f2284 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -155,6 +155,7 @@ using content::BrowserThread;
using content::ChildProcessHost;
using content::DownloadItem;
using content::DownloadManager;
+using content::NavigationEntry;
using content::PluginService;
using content::OpenURLParams;
using content::Referrer;
@@ -1284,7 +1285,7 @@ void TestingAutomationProvider::GetTabTitle(int handle,
*title_string_size = -1; // -1 is the error code
if (tab_tracker_->ContainsHandle(handle)) {
NavigationController* tab = tab_tracker_->GetResource(handle);
- content::NavigationEntry* entry = tab->GetActiveEntry();
+ NavigationEntry* entry = tab->GetActiveEntry();
if (entry != NULL) {
*title = UTF16ToWideHack(entry->GetTitleForDisplay(""));
} else {
@@ -1573,7 +1574,7 @@ void TestingAutomationProvider::GetSecurityState(
int* insecure_content_status) {
if (tab_tracker_->ContainsHandle(handle)) {
NavigationController* tab = tab_tracker_->GetResource(handle);
- content::NavigationEntry* entry = tab->GetActiveEntry();
+ NavigationEntry* entry = tab->GetActiveEntry();
*success = true;
*security_style = entry->GetSSL().security_style;
*ssl_cert_status = entry->GetSSL().cert_status;
@@ -1592,7 +1593,7 @@ void TestingAutomationProvider::GetPageType(
content::PageType* page_type) {
if (tab_tracker_->ContainsHandle(handle)) {
NavigationController* tab = tab_tracker_->GetResource(handle);
- content::NavigationEntry* entry = tab->GetActiveEntry();
+ NavigationEntry* entry = tab->GetActiveEntry();
*page_type = entry->GetPageType();
*success = true;
// In order to return the proper result when an interstitial is shown and
@@ -1619,7 +1620,7 @@ void TestingAutomationProvider::ActionOnSSLBlockingPage(
IPC::Message* reply_message) {
if (tab_tracker_->ContainsHandle(handle)) {
NavigationController* tab = tab_tracker_->GetResource(handle);
- content::NavigationEntry* entry = tab->GetActiveEntry();
+ NavigationEntry* entry = tab->GetActiveEntry();
if (entry->GetPageType() == content::PAGE_TYPE_INTERSTITIAL) {
TabContents* tab_contents = tab->tab_contents();
InterstitialPage* ssl_blocking_page =
@@ -2972,7 +2973,7 @@ void TestingAutomationProvider::GetNavigationInfo(
}
scoped_ptr<DictionaryValue> return_value(new DictionaryValue);
const NavigationController& controller = tab_contents->GetController();
- content::NavigationEntry* nav_entry = controller.GetActiveEntry();
+ NavigationEntry* nav_entry = controller.GetActiveEntry();
DCHECK(nav_entry);
// Security info.
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc
index 54cfb0f..a5e118c 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.cc
+++ b/chrome/browser/content_settings/tab_specific_content_settings.cc
@@ -33,6 +33,7 @@
#include "webkit/fileapi/file_system_types.h"
using content::BrowserThread;
+using content::NavigationEntry;
using content::WebContents;
namespace {
@@ -468,7 +469,7 @@ void TabSpecificContentSettings::Observe(
content::Details<const ContentSettingsDetails> settings_details(details);
const NavigationController& controller = web_contents()->GetController();
- content::NavigationEntry* entry = controller.GetActiveEntry();
+ NavigationEntry* entry = controller.GetActiveEntry();
GURL entry_url;
if (entry)
entry_url = entry->GetURL();
diff --git a/chrome/browser/debugger/devtools_window.cc b/chrome/browser/debugger/devtools_window.cc
index ef58094..513b08e 100644
--- a/chrome/browser/debugger/devtools_window.cc
+++ b/chrome/browser/debugger/devtools_window.cc
@@ -58,6 +58,7 @@ using content::DevToolsAgentHost;
using content::DevToolsAgentHostRegistry;
using content::DevToolsClientHost;
using content::DevToolsManager;
+using content::NavigationEntry;
using content::OpenURLParams;
using content::WebContents;
@@ -190,7 +191,7 @@ DevToolsWindow::DevToolsWindow(TabContentsWrapper* tab_contents,
this);
g_instances.Get().push_back(this);
// Wipe out page icon so that the default application icon is used.
- content::NavigationEntry* entry =
+ NavigationEntry* entry =
tab_contents_->tab_contents()->GetController().GetActiveEntry();
entry->GetFavicon().bitmap = SkBitmap();
entry->GetFavicon().valid = true;
diff --git a/chrome/browser/download/download_request_limiter.cc b/chrome/browser/download/download_request_limiter.cc
index e12f7fb..f2c35db 100644
--- a/chrome/browser/download/download_request_limiter.cc
+++ b/chrome/browser/download/download_request_limiter.cc
@@ -21,6 +21,7 @@
#include "content/public/browser/web_contents_delegate.h"
using content::BrowserThread;
+using content::NavigationEntry;
using content::WebContents;
// TabDownloadState ------------------------------------------------------------
@@ -39,7 +40,7 @@ DownloadRequestLimiter::TabDownloadState::TabDownloadState(
notification_source);
registrar_.Add(this, content::NOTIFICATION_TAB_CLOSED, notification_source);
- content::NavigationEntry* active_entry = originating_controller ?
+ NavigationEntry* active_entry = originating_controller ?
originating_controller->GetActiveEntry() : controller->GetActiveEntry();
if (active_entry)
initial_page_host_ = active_entry->GetURL().host();
@@ -114,7 +115,7 @@ void DownloadRequestLimiter::TabDownloadState::Observe(
// request. If this happens we may let a download through that we
// shouldn't have. But this is rather rare, and it is difficult to get
// 100% right, so we don't deal with it.
- content::NavigationEntry* entry = controller_->GetPendingEntry();
+ NavigationEntry* entry = controller_->GetPendingEntry();
if (!entry)
return;
diff --git a/chrome/browser/extensions/extension_navigation_observer.cc b/chrome/browser/extensions/extension_navigation_observer.cc
index f1aabb1..23c8575 100644
--- a/chrome/browser/extensions/extension_navigation_observer.cc
+++ b/chrome/browser/extensions/extension_navigation_observer.cc
@@ -10,6 +10,8 @@
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_service.h"
+using content::NavigationEntry;
+
ExtensionNavigationObserver::ExtensionNavigationObserver(Profile* profile)
: profile_(profile) {
RegisterForNotifications();
@@ -46,7 +48,7 @@ void ExtensionNavigationObserver::PromptToEnableExtensionIfNecessary(
if (!in_progress_prompt_extension_id_.empty())
return;
- content::NavigationEntry* nav_entry = nav_controller->GetActiveEntry();
+ NavigationEntry* nav_entry = nav_controller->GetActiveEntry();
if (!nav_entry)
return;
diff --git a/chrome/browser/extensions/extension_page_actions_module.cc b/chrome/browser/extensions/extension_page_actions_module.cc
index 713fc81..f8ce2d2 100644
--- a/chrome/browser/extensions/extension_page_actions_module.cc
+++ b/chrome/browser/extensions/extension_page_actions_module.cc
@@ -21,6 +21,8 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/navigation_entry.h"
+using content::NavigationEntry;
+
namespace keys = extension_page_actions_module_constants;
namespace {
@@ -80,7 +82,7 @@ bool PageActionFunction::SetPageActionEnabled(bool enable) {
}
// Make sure the URL hasn't changed.
- content::NavigationEntry* entry =
+ NavigationEntry* entry =
contents->tab_contents()->GetController().GetActiveEntry();
if (!entry || url != entry->GetURL().spec()) {
error_ = ExtensionErrorUtils::FormatErrorMessage(kUrlNotActiveError, url);
diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc
index 55cc01a..32cb17f 100644
--- a/chrome/browser/extensions/extension_tab_util.cc
+++ b/chrome/browser/extensions/extension_tab_util.cc
@@ -18,6 +18,7 @@
namespace keys = extension_tabs_module_constants;
namespace errors = extension_manifest_errors;
+using content::NavigationEntry;
using content::WebContents;
int ExtensionTabUtil::GetWindowId(const Browser* browser) {
@@ -119,8 +120,7 @@ DictionaryValue* ExtensionTabUtil::CreateTabValue(const WebContents* contents,
contents->GetBrowserContext()->IsOffTheRecord());
if (!is_loading) {
- content::NavigationEntry* entry =
- contents->GetController().GetActiveEntry();
+ NavigationEntry* entry = contents->GetController().GetActiveEntry();
if (entry) {
if (entry->GetFavicon().valid)
result->SetString(keys::kFaviconUrlKey, entry->GetFavicon().url.spec());
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index d07df26..e2e65a8 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -60,6 +60,7 @@
namespace keys = extension_tabs_module_constants;
namespace errors = extension_manifest_errors;
+using content::NavigationEntry;
using content::OpenURLParams;
using content::Referrer;
using content::WebContents;
@@ -1377,8 +1378,7 @@ bool ReloadTabFunction::RunImpl() {
TabContents* tab_contents = contents->tab_contents();
if (tab_contents->ShowingInterstitialPage()) {
// This does as same as Browser::ReloadInternal.
- content::NavigationEntry* entry =
- tab_contents->GetController().GetActiveEntry();
+ NavigationEntry* entry = tab_contents->GetController().GetActiveEntry();
OpenURLParams params(entry->GetURL(), Referrer(), CURRENT_TAB,
content::PAGE_TRANSITION_RELOAD, false);
GetCurrentBrowser()->OpenURL(params);
diff --git a/chrome/browser/extensions/extension_url_rewrite_browsertest.cc b/chrome/browser/extensions/extension_url_rewrite_browsertest.cc
index ffdcab3..d23e57c 100644
--- a/chrome/browser/extensions/extension_url_rewrite_browsertest.cc
+++ b/chrome/browser/extensions/extension_url_rewrite_browsertest.cc
@@ -19,6 +19,8 @@
#include "content/public/browser/navigation_entry.h"
#include "googleurl/src/gurl.h"
+using content::NavigationEntry;
+
class ExtensionURLRewriteBrowserTest : public ExtensionBrowserTest {
protected:
std::string GetLocationBarText() const {
@@ -34,7 +36,7 @@ class ExtensionURLRewriteBrowserTest : public ExtensionBrowserTest {
return &browser()->GetSelectedTabContents()->GetController();
}
- content::NavigationEntry* GetNavigationEntry() const {
+ NavigationEntry* GetNavigationEntry() const {
return GetNavigationController()->GetActiveEntry();
}
diff --git a/chrome/browser/external_tab_container_win.cc b/chrome/browser/external_tab_container_win.cc
index 980f616..a83e49d 100644
--- a/chrome/browser/external_tab_container_win.cc
+++ b/chrome/browser/external_tab_container_win.cc
@@ -67,6 +67,7 @@
#include "ui/views/layout/grid_layout.h"
using content::BrowserThread;
+using content::NavigationEntry;
using content::OpenURLParams;
using content::SSLStatus;
using content::WebContents;
@@ -956,7 +957,7 @@ bool ExternalTabContainer::InitNavigationInfo(NavigationInfo* nav_info,
content::NavigationType nav_type,
int relative_offset) {
DCHECK(nav_info);
- content::NavigationEntry* entry =
+ NavigationEntry* entry =
tab_contents_->tab_contents()->GetController().GetActiveEntry();
// If this is very early in the game then we may not have an entry.
if (!entry)
diff --git a/chrome/browser/favicon/favicon_handler.cc b/chrome/browser/favicon/favicon_handler.cc
index a846789..6c1bf56 100644
--- a/chrome/browser/favicon/favicon_handler.cc
+++ b/chrome/browser/favicon/favicon_handler.cc
@@ -21,6 +21,8 @@
#include "ui/gfx/image/image.h"
#include "ui/gfx/image/image_util.h"
+using content::NavigationEntry;
+
namespace {
// Returns history::IconType the given icon_type corresponds to.
@@ -140,20 +142,20 @@ void FaviconHandler::SetFavicon(
}
if (url == url_ && icon_type == history::FAVICON) {
- content::NavigationEntry* entry = GetEntry();
+ NavigationEntry* entry = GetEntry();
if (entry)
UpdateFavicon(entry, &sized_image);
}
}
-void FaviconHandler::UpdateFavicon(content::NavigationEntry* entry,
+void FaviconHandler::UpdateFavicon(NavigationEntry* entry,
scoped_refptr<RefCountedMemory> data) {
scoped_ptr<gfx::Image> image(gfx::ImageFromPNGEncodedData(data->front(),
data->size()));
UpdateFavicon(entry, image.get());
}
-void FaviconHandler::UpdateFavicon(content::NavigationEntry* entry,
+void FaviconHandler::UpdateFavicon(NavigationEntry* entry,
const gfx::Image* image) {
// No matter what happens, we need to mark the favicon as being set.
entry->GetFavicon().valid = true;
@@ -168,7 +170,7 @@ void FaviconHandler::UpdateFavicon(content::NavigationEntry* entry,
void FaviconHandler::OnUpdateFaviconURL(
int32 page_id,
const std::vector<FaviconURL>& candidates) {
- content::NavigationEntry* entry = GetEntry();
+ NavigationEntry* entry = GetEntry();
if (!entry)
return;
@@ -245,8 +247,8 @@ void FaviconHandler::OnDidDownloadFavicon(int id,
download_requests_.erase(i);
}
-content::NavigationEntry* FaviconHandler::GetEntry() {
- content::NavigationEntry* entry = delegate_->GetActiveEntry();
+NavigationEntry* FaviconHandler::GetEntry() {
+ NavigationEntry* entry = delegate_->GetActiveEntry();
if (entry && entry->GetURL() == url_)
return entry;
@@ -313,7 +315,7 @@ bool FaviconHandler::ShouldSaveFavicon(const GURL& url) {
void FaviconHandler::OnFaviconDataForInitialURL(
FaviconService::Handle handle,
history::FaviconData favicon) {
- content::NavigationEntry* entry = GetEntry();
+ NavigationEntry* entry = GetEntry();
if (!entry)
return;
@@ -390,7 +392,7 @@ void FaviconHandler::DownloadFaviconOrAskHistory(
void FaviconHandler::OnFaviconData(FaviconService::Handle handle,
history::FaviconData favicon) {
- content::NavigationEntry* entry = GetEntry();
+ NavigationEntry* entry = GetEntry();
if (!entry)
return;
diff --git a/chrome/browser/favicon/favicon_handler.h b/chrome/browser/favicon/favicon_handler.h
index edcc571..a59e944 100644
--- a/chrome/browser/favicon/favicon_handler.h
+++ b/chrome/browser/favicon/favicon_handler.h
@@ -20,7 +20,6 @@
#include "ui/gfx/favicon_size.h"
class FaviconHandlerDelegate;
-class NavigationEntry;
class Profile;
class RefCountedMemory;
class SkBitmap;
diff --git a/chrome/browser/favicon/favicon_handler_unittest.cc b/chrome/browser/favicon/favicon_handler_unittest.cc
index c630ed3..0018bf5 100644
--- a/chrome/browser/favicon/favicon_handler_unittest.cc
+++ b/chrome/browser/favicon/favicon_handler_unittest.cc
@@ -14,6 +14,8 @@
class TestFaviconHandler;
+using content::NavigationEntry;
+
namespace {
// Fill the given bmp with valid png data.
@@ -134,7 +136,7 @@ class TestFaviconHandlerDelegate : public FaviconHandlerDelegate {
: tab_contents_(tab_contents) {
}
- virtual content::NavigationEntry* GetActiveEntry() {
+ virtual NavigationEntry* GetActiveEntry() {
ADD_FAILURE() << "TestFaviconHandlerDelegate::GetActiveEntry() "
<< "should never be called in tests.";
return NULL;
@@ -163,7 +165,7 @@ class TestFaviconHandler : public FaviconHandler {
Type type)
: FaviconHandler(profile, delegate, type),
download_image_size_(0),
- entry_(content::NavigationEntry::Create()),
+ entry_(NavigationEntry::Create()),
download_id_(0) {
entry_->SetURL(page_url);
}
@@ -189,7 +191,7 @@ class TestFaviconHandler : public FaviconHandler {
download_handler_.reset(download_handler);
}
- virtual content::NavigationEntry* GetEntry() {
+ virtual NavigationEntry* GetEntry() {
return entry_.get();
}
@@ -273,7 +275,7 @@ class TestFaviconHandler : public FaviconHandler {
int download_image_size_;
private:
- scoped_ptr<content::NavigationEntry> entry_;
+ scoped_ptr<NavigationEntry> entry_;
// The unique id of a download request. It will be returned to a
// FaviconHandler.
diff --git a/chrome/browser/favicon/favicon_tab_helper.cc b/chrome/browser/favicon/favicon_tab_helper.cc
index 9c1a027..bfd4a6d 100644
--- a/chrome/browser/favicon/favicon_tab_helper.cc
+++ b/chrome/browser/favicon/favicon_tab_helper.cc
@@ -23,6 +23,7 @@
#include "ui/gfx/image/image.h"
using content::FaviconStatus;
+using content::NavigationEntry;
using content::WebContents;
FaviconTabHelper::FaviconTabHelper(TabContents* tab_contents)
@@ -48,7 +49,7 @@ SkBitmap FaviconTabHelper::GetFavicon() const {
// Like GetTitle(), we also want to use the favicon for the last committed
// entry rather than a pending navigation entry.
const NavigationController& controller = web_contents()->GetController();
- content::NavigationEntry* entry = controller.GetTransientEntry();
+ NavigationEntry* entry = controller.GetTransientEntry();
if (entry)
return entry->GetFavicon().bitmap;
@@ -60,7 +61,7 @@ SkBitmap FaviconTabHelper::GetFavicon() const {
bool FaviconTabHelper::FaviconIsValid() const {
const NavigationController& controller = web_contents()->GetController();
- content::NavigationEntry* entry = controller.GetTransientEntry();
+ NavigationEntry* entry = controller.GetTransientEntry();
if (entry)
return entry->GetFavicon().valid;
@@ -84,8 +85,7 @@ bool FaviconTabHelper::ShouldDisplayFavicon() {
}
void FaviconTabHelper::SaveFavicon() {
- content::NavigationEntry* entry =
- web_contents()->GetController().GetActiveEntry();
+ NavigationEntry* entry = web_contents()->GetController().GetActiveEntry();
if (!entry || entry->GetURL().is_empty())
return;
@@ -133,7 +133,7 @@ void FaviconTabHelper::OnUpdateFaviconURL(
touch_icon_handler_->OnUpdateFaviconURL(page_id, candidates);
}
-content::NavigationEntry* FaviconTabHelper::GetActiveEntry() {
+NavigationEntry* FaviconTabHelper::GetActiveEntry() {
return web_contents()->GetController().GetActiveEntry();
}
diff --git a/chrome/browser/favicon/favicon_tab_helper.h b/chrome/browser/favicon/favicon_tab_helper.h
index 6e2c3a8..d62aaab 100644
--- a/chrome/browser/favicon/favicon_tab_helper.h
+++ b/chrome/browser/favicon/favicon_tab_helper.h
@@ -17,7 +17,6 @@
#include "googleurl/src/gurl.h"
class FaviconHandler;
-class NavigationEntry;
class SkBitmap;
// FaviconTabHelper works with FaviconHandlers to fetch the favicons.
diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context.cc b/chrome/browser/geolocation/chrome_geolocation_permission_context.cc
index dfdfae0..b1f57f3 100644
--- a/chrome/browser/geolocation/chrome_geolocation_permission_context.cc
+++ b/chrome/browser/geolocation/chrome_geolocation_permission_context.cc
@@ -42,6 +42,7 @@
using WebKit::WebSecurityOrigin;
using content::BrowserThread;
+using content::NavigationEntry;
using content::OpenURLParams;
using content::Referrer;
using content::WebContents;
@@ -178,7 +179,7 @@ GeolocationConfirmInfoBarDelegate::GeolocationConfirmInfoBarDelegate(
bridge_id_(bridge_id),
requesting_frame_url_(requesting_frame_url),
display_languages_(display_languages) {
- const content::NavigationEntry* committed_entry =
+ const NavigationEntry* committed_entry =
infobar_helper->web_contents()->GetController().GetLastCommittedEntry();
committed_contents_unique_id_ = committed_entry ?
committed_entry->GetUniqueID() : 0;
diff --git a/chrome/browser/geolocation/geolocation_settings_state_unittest.cc b/chrome/browser/geolocation/geolocation_settings_state_unittest.cc
index db41369..9cd8ee1 100644
--- a/chrome/browser/geolocation/geolocation_settings_state_unittest.cc
+++ b/chrome/browser/geolocation/geolocation_settings_state_unittest.cc
@@ -14,6 +14,7 @@
#include "testing/gtest/include/gtest/gtest.h"
using content::BrowserThread;
+using content::NavigationEntry;
namespace {
@@ -33,8 +34,7 @@ TEST_F(GeolocationSettingsStateTests, ClearOnNewOrigin) {
GeolocationSettingsState state(&profile);
GURL url_0("http://www.example.com");
- scoped_ptr<content::NavigationEntry> entry(
- content::NavigationEntry::Create());
+ scoped_ptr<NavigationEntry> entry(NavigationEntry::Create());
entry->SetURL(url_0);
content::LoadCommittedDetails load_committed_details;
load_committed_details.entry = entry.get();
@@ -139,8 +139,7 @@ TEST_F(GeolocationSettingsStateTests, ShowPortOnSameHost) {
GeolocationSettingsState state(&profile);
GURL url_0("http://www.example.com");
- scoped_ptr<content::NavigationEntry> entry(
- content::NavigationEntry::Create());
+ scoped_ptr<NavigationEntry> entry(NavigationEntry::Create());
entry->SetURL(url_0);
content::LoadCommittedDetails load_committed_details;
load_committed_details.entry = entry.get();
diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/history/history_tab_helper.cc
index c1b7447..f60558d 100644
--- a/chrome/browser/history/history_tab_helper.cc
+++ b/chrome/browser/history/history_tab_helper.cc
@@ -18,6 +18,8 @@
#include "content/public/browser/web_contents_delegate.h"
#include "content/public/common/frame_navigate_params.h"
+using content::NavigationEntry;
+
HistoryTabHelper::HistoryTabHelper(TabContents* tab_contents)
: content::WebContentsObserver(tab_contents),
received_page_title_(false) {
@@ -35,8 +37,7 @@ void HistoryTabHelper::UpdateHistoryForNavigation(
GetHistoryService()->AddPage(*add_page_args);
}
-void HistoryTabHelper::UpdateHistoryPageTitle(
- const content::NavigationEntry& entry) {
+void HistoryTabHelper::UpdateHistoryPageTitle(const NavigationEntry& entry) {
HistoryService* hs = GetHistoryService();
if (hs)
hs->SetPageTitle(entry.GetVirtualURL(), entry.GetTitleForDisplay(""));
diff --git a/chrome/browser/infobars/infobar_delegate.cc b/chrome/browser/infobars/infobar_delegate.cc
index daef494..4a0e35b 100644
--- a/chrome/browser/infobars/infobar_delegate.cc
+++ b/chrome/browser/infobars/infobar_delegate.cc
@@ -11,6 +11,8 @@
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
+using content::NavigationEntry;
+
// InfoBarDelegate ------------------------------------------------------------
InfoBarDelegate::~InfoBarDelegate() {
@@ -83,7 +85,7 @@ InfoBarDelegate::InfoBarDelegate(InfoBarTabHelper* infobar_helper)
void InfoBarDelegate::StoreActiveEntryUniqueID(
InfoBarTabHelper* infobar_helper) {
- content::NavigationEntry* active_entry =
+ NavigationEntry* active_entry =
infobar_helper->web_contents()->GetController().GetActiveEntry();
contents_unique_id_ = active_entry ? active_entry->GetUniqueID() : 0;
}
diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc
index 3644246..c91cd4a1 100644
--- a/chrome/browser/instant/instant_loader.cc
+++ b/chrome/browser/instant/instant_loader.cc
@@ -51,6 +51,8 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/codec/png_codec.h"
+using content::NavigationEntry;
+
namespace {
// Number of ms to delay before updating the omnibox bounds. This is only used
@@ -142,7 +144,7 @@ void InstantLoader::FrameLoadObserver::Observe(
switch (type) {
case content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME: {
int page_id = *(content::Details<int>(details).ptr());
- content::NavigationEntry* active_entry =
+ NavigationEntry* active_entry =
tab_contents_->GetController().GetActiveEntry();
if (!active_entry || active_entry->GetPageID() != page_id ||
active_entry->GetUniqueID() != unique_id_) {
@@ -332,7 +334,7 @@ void InstantLoader::TabContentsDelegateImpl::CommitHistory(
add_page_vector_[i].get());
}
- content::NavigationEntry* active_entry =
+ NavigationEntry* active_entry =
tab->tab_contents()->GetController().GetActiveEntry();
if (!active_entry) {
// It appears to be possible to get here with no active entry. This seems
@@ -549,7 +551,7 @@ void InstantLoader::TabContentsDelegateImpl::OnSetSuggestions(
const std::vector<std::string>& suggestions,
InstantCompleteBehavior behavior) {
TabContentsWrapper* source = loader_->preview_contents();
- content::NavigationEntry* entry =
+ NavigationEntry* entry =
source->tab_contents()->GetController().GetActiveEntry();
if (!entry || page_id != entry->GetPageID())
return;
diff --git a/chrome/browser/memory_details.cc b/chrome/browser/memory_details.cc
index 9569c05..aaa2357 100644
--- a/chrome/browser/memory_details.cc
+++ b/chrome/browser/memory_details.cc
@@ -35,6 +35,7 @@
#endif
using content::BrowserThread;
+using content::NavigationEntry;
// static
std::string ProcessMemoryInformation::GetRendererTypeNameInEnglish(
@@ -284,9 +285,9 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
// last committed entry.
//
// Either the pending or last committed entries can be NULL.
- const content::NavigationEntry* pending_entry =
+ const NavigationEntry* pending_entry =
contents->GetController().GetPendingEntry();
- const content::NavigationEntry* last_committed_entry =
+ const NavigationEntry* last_committed_entry =
contents->GetController().GetLastCommittedEntry();
if ((last_committed_entry &&
LowerCaseEqualsASCII(last_committed_entry->GetVirtualURL().spec(),
diff --git a/chrome/browser/omnibox_search_hint.cc b/chrome/browser/omnibox_search_hint.cc
index 751b055..92532a1 100644
--- a/chrome/browser/omnibox_search_hint.cc
+++ b/chrome/browser/omnibox_search_hint.cc
@@ -39,6 +39,8 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
+using content::NavigationEntry;
+
// The URLs of search engines for which we want to trigger the infobar.
const char* const kSearchEngineURLs[] = {
"http://www.google.com/",
@@ -175,7 +177,7 @@ void OmniboxSearchHint::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED) {
- content::NavigationEntry* entry =
+ NavigationEntry* entry =
tab_->tab_contents()->GetController().GetActiveEntry();
if (search_engine_urls_.find(entry->GetURL().spec()) ==
search_engine_urls_.end()) {
diff --git a/chrome/browser/printing/print_dialog_cloud.cc b/chrome/browser/printing/print_dialog_cloud.cc
index 8a2e56e..8815789 100644
--- a/chrome/browser/printing/print_dialog_cloud.cc
+++ b/chrome/browser/printing/print_dialog_cloud.cc
@@ -104,6 +104,7 @@
// bringing up the dialog) isn't what we want.
using content::BrowserThread;
+using content::NavigationEntry;
using content::WebContents;
namespace internal_cloud_print_helpers {
@@ -302,7 +303,7 @@ void CloudPrintFlowHandler::RegisterMessages() {
// to the real server URL, now that we've gotten an HTML dialog
// going.
NavigationController* controller = &web_ui_->tab_contents()->GetController();
- content::NavigationEntry* pending_entry = controller->GetPendingEntry();
+ NavigationEntry* pending_entry = controller->GetPendingEntry();
if (pending_entry) {
Profile* profile = Profile::FromWebUI(web_ui_);
pending_entry->SetURL(
diff --git a/chrome/browser/rlz/rlz.cc b/chrome/browser/rlz/rlz.cc
index a191790..49f8087 100644
--- a/chrome/browser/rlz/rlz.cc
+++ b/chrome/browser/rlz/rlz.cc
@@ -37,6 +37,7 @@
#include "content/public/browser/notification_service.h"
using content::BrowserThread;
+using content::NavigationEntry;
namespace {
@@ -305,8 +306,8 @@ void RLZTracker::Observe(int type,
content::NotificationService::AllSources());
break;
case content::NOTIFICATION_NAV_ENTRY_PENDING: {
- const content::NavigationEntry* entry =
- content::Details<content::NavigationEntry>(details).ptr();
+ const NavigationEntry* entry =
+ content::Details<NavigationEntry>(details).ptr();
if (entry != NULL &&
((entry->GetTransitionType() &
content::PAGE_TRANSITION_HOME_PAGE) != 0)) {
diff --git a/chrome/browser/rlz/rlz_unittest.cc b/chrome/browser/rlz/rlz_unittest.cc
index 1e28437..990c207 100644
--- a/chrome/browser/rlz/rlz_unittest.cc
+++ b/chrome/browser/rlz/rlz_unittest.cc
@@ -24,6 +24,7 @@
#include "testing/gtest/include/gtest/gtest.h"
using base::win::RegKey;
+using content::NavigationEntry;
using registry_util::RegistryOverrideManager;
using testing::AssertionResult;
using testing::AssertionSuccess;
@@ -237,13 +238,12 @@ void RlzLibTest::SimulateOmniboxUsage() {
}
void RlzLibTest::SimulateHomepageUsage() {
- scoped_ptr<content::NavigationEntry> entry(
- content::NavigationEntry::Create());
+ scoped_ptr<NavigationEntry> entry(NavigationEntry::Create());
entry->SetPageID(0);
entry->SetTransitionType(content::PAGE_TRANSITION_HOME_PAGE);
tracker_.Observe(content::NOTIFICATION_NAV_ENTRY_PENDING,
content::NotificationService::AllSources(),
- content::Details<content::NavigationEntry>(entry.get()));
+ content::Details<NavigationEntry>(entry.get()));
}
void RlzLibTest::InvokeDelayedInit() {
@@ -582,16 +582,15 @@ TEST_F(RlzLibTest, PingUpdatesRlzCache) {
}
TEST_F(RlzLibTest, ObserveHandlesBadArgs) {
- scoped_ptr<content::NavigationEntry> entry(
- content::NavigationEntry::Create());
+ scoped_ptr<NavigationEntry> entry(NavigationEntry::Create());
entry->SetPageID(0);
entry->SetTransitionType(content::PAGE_TRANSITION_LINK);
tracker_.Observe(content::NOTIFICATION_NAV_ENTRY_PENDING,
content::NotificationService::AllSources(),
- content::Details<content::NavigationEntry>(NULL));
+ content::Details<NavigationEntry>(NULL));
tracker_.Observe(content::NOTIFICATION_NAV_ENTRY_PENDING,
content::NotificationService::AllSources(),
- content::Details<content::NavigationEntry>(entry.get()));
+ content::Details<NavigationEntry>(entry.get()));
}
TEST_F(RlzLibTest, ReactivationNonOrganicNonOrganic) {
diff --git a/chrome/browser/safe_browsing/browser_feature_extractor.cc b/chrome/browser/safe_browsing/browser_feature_extractor.cc
index ccf8b69e..16cd5e2 100644
--- a/chrome/browser/safe_browsing/browser_feature_extractor.cc
+++ b/chrome/browser/safe_browsing/browser_feature_extractor.cc
@@ -28,6 +28,7 @@
#include "googleurl/src/gurl.h"
using content::BrowserThread;
+using content::NavigationEntry;
using content::WebContents;
namespace safe_browsing {
@@ -52,7 +53,7 @@ static void AddNavigationFeatures(const std::string& feature_prefix,
int index,
const std::vector<GURL>& redirect_chain,
ClientPhishingRequest* request) {
- content::NavigationEntry* entry = controller.GetEntryAtIndex(index);
+ NavigationEntry* entry = controller.GetEntryAtIndex(index);
bool is_secure_referrer = entry->GetReferrer().url.SchemeIsSecure();
if (!is_secure_referrer) {
AddFeature(StringPrintf("%s%s=%s",
@@ -162,7 +163,7 @@ void BrowserFeatureExtractor::ExtractFeatures(const BrowseInfo* info,
// The url that we are extracting features for should already be commited.
DCHECK_NE(index, -1);
for (; index >= 0; index--) {
- content::NavigationEntry* entry = controller.GetEntryAtIndex(index);
+ NavigationEntry* entry = controller.GetEntryAtIndex(index);
if (url_index == -1 && entry->GetURL() == request_url) {
// It's possible that we've been on the on the possibly phishy url before
// in this tab, so make sure that we use the latest navigation for
diff --git a/chrome/browser/safe_browsing/client_side_detection_host.cc b/chrome/browser/safe_browsing/client_side_detection_host.cc
index c8cc31e..86ee34a 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_host.cc
@@ -37,6 +37,7 @@
#include "googleurl/src/gurl.h"
using content::BrowserThread;
+using content::NavigationEntry;
using content::WebContents;
namespace safe_browsing {
@@ -475,7 +476,7 @@ bool ClientSideDetectionHost::DidShowSBInterstitial() {
if (unsafe_unique_page_id_ <= 0 || !web_contents()) {
return false;
}
- const content::NavigationEntry* nav_entry =
+ const NavigationEntry* nav_entry =
web_contents()->GetController().GetActiveEntry();
return (nav_entry && nav_entry->GetUniqueID() == unsafe_unique_page_id_);
}
diff --git a/chrome/browser/safe_browsing/malware_details.cc b/chrome/browser/safe_browsing/malware_details.cc
index 5bc324e..f15af44 100644
--- a/chrome/browser/safe_browsing/malware_details.cc
+++ b/chrome/browser/safe_browsing/malware_details.cc
@@ -24,6 +24,7 @@
#include "net/url_request/url_request_context_getter.h"
using content::BrowserThread;
+using content::NavigationEntry;
using content::WebContents;
using safe_browsing::ClientMalwareReportRequest;
@@ -168,8 +169,7 @@ void MalwareDetails::StartCollection() {
}
GURL referrer_url;
- content::NavigationEntry* nav_entry =
- web_contents()->GetController().GetActiveEntry();
+ NavigationEntry* nav_entry = web_contents()->GetController().GetActiveEntry();
if (nav_entry) {
referrer_url = nav_entry->GetReferrer().url;
if (IsPublicUrl(referrer_url)) {
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
index 6165f1c..138fb1e 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
@@ -14,6 +14,7 @@
#include "content/test/test_browser_thread.h"
using content::BrowserThread;
+using content::NavigationEntry;
static const char* kGoogleURL = "http://www.google.com/";
static const char* kGoodURL = "http://www.goodguys.com/";
@@ -115,8 +116,7 @@ class SafeBrowsingBlockingPageTest : public ChromeRenderViewHostTestHarness,
}
void GoBack(bool is_cross_site) {
- content::NavigationEntry* entry =
- contents()->GetController().GetEntryAtOffset(-1);
+ NavigationEntry* entry = contents()->GetController().GetEntryAtOffset(-1);
ASSERT_TRUE(entry);
contents()->GetController().GoBack();
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
index 1b7c9bf..285847e 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -46,6 +46,7 @@
#endif
using content::BrowserThread;
+using content::NavigationEntry;
namespace {
@@ -1055,8 +1056,7 @@ void SafeBrowsingService::DoDisplayBlockingPage(
CanReportStats()) {
GURL page_url = tab_contents->GetURL();
GURL referrer_url;
- content::NavigationEntry* entry =
- tab_contents->GetController().GetActiveEntry();
+ NavigationEntry* entry = tab_contents->GetController().GetActiveEntry();
if (entry)
referrer_url = entry->GetReferrer().url;
diff --git a/chrome/browser/sessions/base_session_service.cc b/chrome/browser/sessions/base_session_service.cc
index a4be31b..1ed1b4a 100644
--- a/chrome/browser/sessions/base_session_service.cc
+++ b/chrome/browser/sessions/base_session_service.cc
@@ -18,8 +18,9 @@
#include "content/public/common/referrer.h"
#include "webkit/glue/webkit_glue.h"
-using content::BrowserThread;
using WebKit::WebReferrerPolicy;
+using content::BrowserThread;
+using content::NavigationEntry;
// InternalGetCommandsRequest -------------------------------------------------
@@ -138,7 +139,7 @@ SessionCommand* BaseSessionService::CreateUpdateTabNavigationCommand(
SessionID::id_type command_id,
SessionID::id_type tab_id,
int index,
- const content::NavigationEntry& entry) {
+ const NavigationEntry& entry) {
// Use pickle to handle marshalling.
Pickle pickle;
pickle.WriteInt(tab_id);
diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc
index 830d3bb..ff7cf00 100644
--- a/chrome/browser/sessions/session_service.cc
+++ b/chrome/browser/sessions/session_service.cc
@@ -43,6 +43,7 @@
#endif
using base::Time;
+using content::NavigationEntry;
// Identifier for commands written to file.
static const SessionCommand::id_type kCommandSetTabWindow = 0;
@@ -362,7 +363,7 @@ void SessionService::UpdateTabNavigation(
const SessionID& window_id,
const SessionID& tab_id,
int index,
- const content::NavigationEntry& entry) {
+ const NavigationEntry& entry) {
if (!ShouldTrackEntry(entry.GetVirtualURL()) ||
!ShouldTrackChangesToWindow(window_id)) {
return;
@@ -1139,7 +1140,7 @@ void SessionService::BuildCommandsForTab(
wrapper->extension_tab_helper()->extension_app()->id()));
}
for (int i = min_index; i < max_index; ++i) {
- const content::NavigationEntry* entry = (i == pending_index) ?
+ const NavigationEntry* entry = (i == pending_index) ?
tab->tab_contents()->GetController().GetPendingEntry() :
tab->tab_contents()->GetController().GetEntryAtIndex(i);
DCHECK(entry);
diff --git a/chrome/browser/sessions/session_service_unittest.cc b/chrome/browser/sessions/session_service_unittest.cc
index f93b475..7c3313e 100644
--- a/chrome/browser/sessions/session_service_unittest.cc
+++ b/chrome/browser/sessions/session_service_unittest.cc
@@ -28,6 +28,8 @@
#include "content/public/browser/notification_service.h"
#include "testing/gtest/include/gtest/gtest.h"
+using content::NavigationEntry;
+
class SessionServiceTest : public BrowserWithTestWindowTest,
public content::NotificationObserver {
public:
@@ -69,8 +71,7 @@ class SessionServiceTest : public BrowserWithTestWindowTest,
const TabNavigation& navigation,
int index,
bool select) {
- scoped_ptr<content::NavigationEntry> entry(
- content::NavigationEntry::Create());
+ scoped_ptr<NavigationEntry> entry(NavigationEntry::Create());
entry->SetURL(navigation.virtual_url());
entry->SetReferrer(navigation.referrer());
entry->SetTitle(navigation.title());
diff --git a/chrome/browser/sessions/session_types.cc b/chrome/browser/sessions/session_types.cc
index 30c2a11..ac689f0 100644
--- a/chrome/browser/sessions/session_types.cc
+++ b/chrome/browser/sessions/session_types.cc
@@ -10,6 +10,8 @@
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
+using content::NavigationEntry;
+
// TabNavigation --------------------------------------------------------------
TabNavigation::TabNavigation()
@@ -58,9 +60,9 @@ TabNavigation& TabNavigation::operator=(const TabNavigation& tab) {
}
// static
-content::NavigationEntry* TabNavigation::ToNavigationEntry(
+NavigationEntry* TabNavigation::ToNavigationEntry(
int page_id, Profile *profile) const {
- content::NavigationEntry* entry = NavigationController::CreateNavigationEntry(
+ NavigationEntry* entry = NavigationController::CreateNavigationEntry(
virtual_url_,
referrer_,
// Use a transition type of reload so that we don't incorrectly
@@ -79,8 +81,7 @@ content::NavigationEntry* TabNavigation::ToNavigationEntry(
return entry;
}
-void TabNavigation::SetFromNavigationEntry(
- const content::NavigationEntry& entry) {
+void TabNavigation::SetFromNavigationEntry(const NavigationEntry& entry) {
virtual_url_ = entry.GetVirtualURL();
referrer_ = entry.GetReferrer();
title_ = entry.GetTitle();
@@ -93,7 +94,7 @@ void TabNavigation::SetFromNavigationEntry(
void TabNavigation::CreateNavigationEntriesFromTabNavigations(
Profile* profile,
const std::vector<TabNavigation>& navigations,
- std::vector<content::NavigationEntry*>* entries) {
+ std::vector<NavigationEntry*>* entries) {
int page_id = 0;
for (std::vector<TabNavigation>::const_iterator i =
navigations.begin(); i != navigations.end(); ++i, ++page_id) {
diff --git a/chrome/browser/sessions/tab_restore_service.cc b/chrome/browser/sessions/tab_restore_service.cc
index f6e9646..1fed2156 100644
--- a/chrome/browser/sessions/tab_restore_service.cc
+++ b/chrome/browser/sessions/tab_restore_service.cc
@@ -32,6 +32,7 @@
#include "content/public/browser/navigation_entry.h"
using base::Time;
+using content::NavigationEntry;
// TimeFactory-----------------------------------------------------------------
@@ -491,7 +492,7 @@ void TabRestoreService::PopulateTab(Tab* tab,
entry_count++;
tab->navigations.resize(static_cast<int>(entry_count));
for (int i = 0; i < entry_count; ++i) {
- content::NavigationEntry* entry = (i == pending_index) ?
+ NavigationEntry* entry = (i == pending_index) ?
controller->GetPendingEntry() : controller->GetEntryAtIndex(i);
tab->navigations[i].SetFromNavigationEntry(*entry);
}
@@ -657,7 +658,7 @@ void TabRestoreService::ScheduleCommandsForTab(const Tab& tab,
// Creating a NavigationEntry isn't the most efficient way to go about
// this, but it simplifies the code and makes it less error prone as we
// add new data to NavigationEntry.
- scoped_ptr<content::NavigationEntry> entry(
+ scoped_ptr<NavigationEntry> entry(
navigations[i].ToNavigationEntry(wrote_count, profile()));
ScheduleCommand(
CreateUpdateTabNavigationCommand(kCommandUpdateTabNavigation, tab.id,
diff --git a/chrome/browser/sessions/tab_restore_service_browsertest.cc b/chrome/browser/sessions/tab_restore_service_browsertest.cc
index 991cfe3..d664597 100644
--- a/chrome/browser/sessions/tab_restore_service_browsertest.cc
+++ b/chrome/browser/sessions/tab_restore_service_browsertest.cc
@@ -21,6 +21,8 @@
typedef TabRestoreService::Tab Tab;
+using content::NavigationEntry;
+
// Create subclass that overrides TimeNow so that we can control the time used
// for closed tabs and windows.
class TabRestoreTimeFactory : public TabRestoreService::TimeFactory {
@@ -99,8 +101,7 @@ class TabRestoreServiceTest : public ChromeRenderViewHostTestHarness {
session_service->SetSelectedTabInWindow(window_id, 0);
if (pinned)
session_service->SetPinnedState(window_id, tab_id, true);
- scoped_ptr<content::NavigationEntry> entry(
- content::NavigationEntry::Create());;
+ scoped_ptr<NavigationEntry> entry(NavigationEntry::Create());;
entry->SetURL(url1_);
session_service->UpdateTabNavigation(window_id, tab_id, 0, *entry.get());
}
diff --git a/chrome/browser/ssl/ssl_blocking_page.cc b/chrome/browser/ssl/ssl_blocking_page.cc
index 1c516a5..b93921d 100644
--- a/chrome/browser/ssl/ssl_blocking_page.cc
+++ b/chrome/browser/ssl/ssl_blocking_page.cc
@@ -27,6 +27,8 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
+using content::NavigationEntry;
+
namespace {
enum SSLBlockingPageEvent {
@@ -109,7 +111,7 @@ std::string SSLBlockingPage::GetHTMLContents() {
return jstemplate_builder::GetI18nTemplateHtml(html, &strings);
}
-void SSLBlockingPage::UpdateEntry(content::NavigationEntry* entry) {
+void SSLBlockingPage::UpdateEntry(NavigationEntry* entry) {
const net::SSLInfo& ssl_info = handler_->ssl_info();
int cert_id = CertStore::GetInstance()->StoreCert(
ssl_info.cert, tab()->GetRenderProcessHost()->GetID());
diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc
index 10ed94b..02327e1 100644
--- a/chrome/browser/ssl/ssl_browser_tests.cc
+++ b/chrome/browser/ssl/ssl_browser_tests.cc
@@ -24,6 +24,7 @@
#include "net/base/cert_status_flags.h"
#include "net/test/test_server.h"
+using content::NavigationEntry;
using content::SSLStatus;
const FilePath::CharType kDocRoot[] = FILE_PATH_LITERAL("chrome/test/data");
@@ -51,7 +52,7 @@ class SSLUITest : public InProcessBrowserTest {
void CheckAuthenticatedState(TabContents* tab,
bool displayed_insecure_content) {
ASSERT_FALSE(tab->IsCrashed());
- content::NavigationEntry* entry = tab->GetController().GetActiveEntry();
+ NavigationEntry* entry = tab->GetController().GetActiveEntry();
ASSERT_TRUE(entry);
EXPECT_EQ(content::PAGE_TYPE_NORMAL, entry->GetPageType());
EXPECT_EQ(content::SECURITY_STYLE_AUTHENTICATED,
@@ -66,7 +67,7 @@ class SSLUITest : public InProcessBrowserTest {
void CheckUnauthenticatedState(TabContents* tab) {
ASSERT_FALSE(tab->IsCrashed());
- content::NavigationEntry* entry = tab->GetController().GetActiveEntry();
+ NavigationEntry* entry = tab->GetController().GetActiveEntry();
ASSERT_TRUE(entry);
EXPECT_EQ(content::PAGE_TYPE_NORMAL, entry->GetPageType());
EXPECT_EQ(content::SECURITY_STYLE_UNAUTHENTICATED,
@@ -83,7 +84,7 @@ class SSLUITest : public InProcessBrowserTest {
bool ran_insecure_content,
bool interstitial) {
ASSERT_FALSE(tab->IsCrashed());
- content::NavigationEntry* entry = tab->GetController().GetActiveEntry();
+ NavigationEntry* entry = tab->GetController().GetActiveEntry();
ASSERT_TRUE(entry);
EXPECT_EQ(interstitial ?
content::PAGE_TYPE_INTERSTITIAL : content::PAGE_TYPE_NORMAL,
@@ -328,7 +329,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, MAYBE_TestHTTPSExpiredCertAndDontProceed) {
https_server_.GetURL("files/ssl/google.html"));
TabContents* tab = browser()->GetSelectedTabContents();
- content::NavigationEntry* entry = tab->GetController().GetActiveEntry();
+ NavigationEntry* entry = tab->GetController().GetActiveEntry();
ASSERT_TRUE(entry);
GURL cross_site_url =
@@ -373,7 +374,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest,
ui_test_utils::NavigateToURL(browser(),
test_server()->GetURL("files/ssl/google.html"));
TabContents* tab = browser()->GetSelectedTabContents();
- content::NavigationEntry* entry = tab->GetController().GetActiveEntry();
+ NavigationEntry* entry = tab->GetController().GetActiveEntry();
ASSERT_TRUE(entry);
// Now go to a bad HTTPS page that shows an interstitial.
@@ -409,7 +410,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, FLAKY_TestHTTPSExpiredCertAndGoBackViaMenu) {
ui_test_utils::NavigateToURL(browser(),
test_server()->GetURL("files/ssl/google.html"));
TabContents* tab = browser()->GetSelectedTabContents();
- content::NavigationEntry* entry = tab->GetController().GetActiveEntry();
+ NavigationEntry* entry = tab->GetController().GetActiveEntry();
ASSERT_TRUE(entry);
// Now go to a bad HTTPS page that shows an interstitial.
@@ -436,11 +437,11 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, FLAKY_TestHTTPSExpiredCertAndGoForward) {
ui_test_utils::NavigateToURL(browser(),
test_server()->GetURL("files/ssl/google.html"));
TabContents* tab = browser()->GetSelectedTabContents();
- content::NavigationEntry* entry1 = tab->GetController().GetActiveEntry();
+ NavigationEntry* entry1 = tab->GetController().GetActiveEntry();
ASSERT_TRUE(entry1);
ui_test_utils::NavigateToURL(browser(),
test_server()->GetURL("files/ssl/blank_page.html"));
- content::NavigationEntry* entry2 = tab->GetController().GetActiveEntry();
+ NavigationEntry* entry2 = tab->GetController().GetActiveEntry();
ASSERT_TRUE(entry2);
// Now go back so that a page is in the forward history.
@@ -452,7 +453,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, FLAKY_TestHTTPSExpiredCertAndGoForward) {
observer.Wait();
}
ASSERT_TRUE(tab->GetController().CanGoForward());
- content::NavigationEntry* entry3 = tab->GetController().GetActiveEntry();
+ NavigationEntry* entry3 = tab->GetController().GetActiveEntry();
ASSERT_TRUE(entry1 == entry3);
// Now go to a bad HTTPS page that shows an interstitial.
@@ -474,7 +475,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, FLAKY_TestHTTPSExpiredCertAndGoForward) {
EXPECT_FALSE(browser()->GetSelectedTabContents()->GetInterstitialPage());
CheckUnauthenticatedState(tab);
EXPECT_FALSE(tab->GetController().CanGoForward());
- content::NavigationEntry* entry4 = tab->GetController().GetActiveEntry();
+ NavigationEntry* entry4 = tab->GetController().GetActiveEntry();
EXPECT_TRUE(entry2 == entry4);
}
diff --git a/chrome/browser/sync/glue/session_model_associator.cc b/chrome/browser/sync/glue/session_model_associator.cc
index bbdc008..0a32957 100644
--- a/chrome/browser/sync/glue/session_model_associator.cc
+++ b/chrome/browser/sync/glue/session_model_associator.cc
@@ -38,11 +38,12 @@
#include <windows.h>
#endif
-namespace browser_sync {
-
using content::BrowserThread;
+using content::NavigationEntry;
using syncable::SESSIONS;
+namespace browser_sync {
+
namespace {
static const char kNoSessionsFolderError[] =
"Server did not create the top-level sessions node. We "
@@ -336,7 +337,7 @@ bool SessionModelAssociator::WriteTabContentsToSyncModel(
tab_s->set_extension_app_id(tab.GetExtensionAppId());
}
for (int i = min_index; i < max_index; ++i) {
- const content::NavigationEntry* entry = (i == pending_index) ?
+ const NavigationEntry* entry = (i == pending_index) ?
tab.GetPendingEntry() : tab.GetEntryAtIndex(i);
DCHECK(entry);
if (entry->GetVirtualURL().is_valid()) {
@@ -1064,7 +1065,7 @@ bool SessionModelAssociator::IsValidTab(const SyncedTabDelegate& tab) const {
tab.GetWindowId());
if (!window)
return false;
- const content::NavigationEntry* entry = tab.GetActiveEntry();
+ const NavigationEntry* entry = tab.GetActiveEntry();
if (!entry)
return false;
if (entry->GetVirtualURL().is_valid() &&
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index 8cdb7e2..9c2e92b 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -88,6 +88,7 @@
#endif
using content::DownloadManager;
+using content::NavigationEntry;
using content::OpenURLParams;
using content::SSLStatus;
using content::UserMetricsAction;
@@ -1196,7 +1197,7 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const {
// the page) from the NavigationEntry because its reflects their origin
// rather than the display one (returned by GetURL) which may be
// different (like having "view-source:" on the front).
- content::NavigationEntry* active_entry =
+ NavigationEntry* active_entry =
source_tab_contents_->GetController().GetActiveEntry();
return SavePackage::IsSavableURL(
(active_entry) ? active_entry->GetURL() : GURL());
@@ -1567,7 +1568,7 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) {
break;
case IDC_CONTENT_CONTEXT_VIEWPAGEINFO: {
- content::NavigationEntry* nav_entry =
+ NavigationEntry* nav_entry =
source_tab_contents_->GetController().GetActiveEntry();
source_tab_contents_->ShowPageInfo(nav_entry->GetURL(),
nav_entry->GetSSL(), true);
diff --git a/chrome/browser/tabs/pinned_tab_codec.cc b/chrome/browser/tabs/pinned_tab_codec.cc
index abac1c0..74a9920 100644
--- a/chrome/browser/tabs/pinned_tab_codec.cc
+++ b/chrome/browser/tabs/pinned_tab_codec.cc
@@ -17,6 +17,8 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/navigation_entry.h"
+using content::NavigationEntry;
+
typedef BrowserInit::LaunchWithProfile::Tab Tab;
// Key used in dictionaries for the app id.
@@ -54,7 +56,7 @@ static void EncodePinnedTab(TabStripModel* model,
value->SetString(kURL, extension->GetFullLaunchURL().spec());
values->Append(value.release());
} else {
- content::NavigationEntry* entry =
+ NavigationEntry* entry =
tab_contents->tab_contents()->GetController().GetActiveEntry();
if (!entry && tab_contents->tab_contents()->GetController().entry_count())
entry = tab_contents->tab_contents()->GetController().GetEntryAtIndex(0);
diff --git a/chrome/browser/tabs/tab_finder.cc b/chrome/browser/tabs/tab_finder.cc
index e5199cd..43d66f7 100644
--- a/chrome/browser/tabs/tab_finder.cc
+++ b/chrome/browser/tabs/tab_finder.cc
@@ -24,6 +24,7 @@
#include "content/public/common/frame_navigate_params.h"
#include "content/public/common/page_transition_types.h"
+using content::NavigationEntry;
using content::WebContents;
class TabFinder::WebContentsObserverImpl : public content::WebContentsObserver {
@@ -211,7 +212,7 @@ void TabFinder::FetchRedirectStart(WebContents* tab) {
if (profile->IsOffTheRecord())
return;
- content::NavigationEntry* committed_entry =
+ NavigationEntry* committed_entry =
tab->GetController().GetLastCommittedEntry();
if (!committed_entry || committed_entry->GetURL().is_empty())
return;
diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc
index f85e616..277aea6 100644
--- a/chrome/browser/tabs/tab_strip_model.cc
+++ b/chrome/browser/tabs/tab_strip_model.cc
@@ -34,6 +34,7 @@
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents_delegate.h"
+using content::NavigationEntry;
using content::UserMetricsAction;
using content::WebContents;
@@ -216,14 +217,13 @@ TabContentsWrapper* TabStripModel::DiscardTabContentsAt(int index) {
NULL /* base_tab_contents */,
NULL /* session_storage_namespace */));
TabContentsWrapper* old_contents = GetContentsAt(index);
- content::NavigationEntry* old_nav_entry =
+ NavigationEntry* old_nav_entry =
old_contents->tab_contents()->GetController().GetActiveEntry();
if (old_nav_entry) {
// Set the new tab contents to reload this URL when clicked.
// This also allows the tab to keep drawing the favicon and page title.
- content::NavigationEntry* new_nav_entry =
- content::NavigationEntry::Create(*old_nav_entry);
- std::vector<content::NavigationEntry*> entries;
+ NavigationEntry* new_nav_entry = NavigationEntry::Create(*old_nav_entry);
+ std::vector<NavigationEntry*> entries;
entries.push_back(new_nav_entry);
null_contents->tab_contents()->GetController().Restore(0, false, &entries);
}
diff --git a/chrome/browser/translate/options_menu_model.cc b/chrome/browser/translate/options_menu_model.cc
index af19ca6..229195a 100644
--- a/chrome/browser/translate/options_menu_model.cc
+++ b/chrome/browser/translate/options_menu_model.cc
@@ -16,6 +16,7 @@
#include "grit/locale_settings.h"
#include "ui/base/l10n/l10n_util.h"
+using content::NavigationEntry;
using content::OpenURLParams;
using content::Referrer;
using content::WebContents;
@@ -100,7 +101,7 @@ bool OptionsMenuModel::IsCommandIdEnabled(int command_id) const {
DCHECK(translate_infobar_delegate_ != NULL);
DCHECK(translate_infobar_delegate_->owner() != NULL);
DCHECK(translate_infobar_delegate_->owner()->web_contents() != NULL);
- content::NavigationEntry* entry = translate_infobar_delegate_->owner()->
+ NavigationEntry* entry = translate_infobar_delegate_->owner()->
web_contents()->GetController().GetActiveEntry();
// Delegate and tab contents should never be NULL, but active entry
// can be NULL when running tests. We want to return false if NULL.
diff --git a/chrome/browser/translate/translate_infobar_delegate.cc b/chrome/browser/translate/translate_infobar_delegate.cc
index cb285d2..5f19dbf 100644
--- a/chrome/browser/translate/translate_infobar_delegate.cc
+++ b/chrome/browser/translate/translate_infobar_delegate.cc
@@ -23,6 +23,8 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
+using content::NavigationEntry;
+
// static
const size_t TranslateInfoBarDelegate::kNoIndex = static_cast<size_t>(-1);
@@ -399,7 +401,7 @@ TranslateInfoBarDelegate*
}
std::string TranslateInfoBarDelegate::GetPageHost() {
- content::NavigationEntry* entry =
+ NavigationEntry* entry =
owner()->web_contents()->GetController().GetActiveEntry();
return entry ? entry->GetURL().HostNoBrackets() : std::string();
}
diff --git a/chrome/browser/translate/translate_manager.cc b/chrome/browser/translate/translate_manager.cc
index dd1ec5a..dcb2324 100644
--- a/chrome/browser/translate/translate_manager.cc
+++ b/chrome/browser/translate/translate_manager.cc
@@ -48,6 +48,7 @@
#include "net/url_request/url_request_status.h"
#include "ui/base/resource/resource_bundle.h"
+using content::NavigationEntry;
using content::WebContents;
namespace {
@@ -262,7 +263,7 @@ void TranslateManager::Observe(int type,
content::Source<NavigationController>(source).ptr();
content::LoadCommittedDetails* load_details =
content::Details<content::LoadCommittedDetails>(details).ptr();
- content::NavigationEntry* entry = controller->GetActiveEntry();
+ NavigationEntry* entry = controller->GetActiveEntry();
if (!entry) {
NOTREACHED();
return;
@@ -402,7 +403,7 @@ void TranslateManager::OnURLFetchComplete(const content::URLFetcher* source) {
// The tab went away while we were retrieving the script.
continue;
}
- content::NavigationEntry* entry = tab->GetController().GetActiveEntry();
+ NavigationEntry* entry = tab->GetController().GetActiveEntry();
if (!entry || entry->GetPageID() != request.page_id) {
// We navigated away from the page the translation was triggered on.
continue;
@@ -468,7 +469,7 @@ void TranslateManager::InitiateTranslation(WebContents* tab,
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableTranslate))
return;
- content::NavigationEntry* entry = tab->GetController().GetActiveEntry();
+ NavigationEntry* entry = tab->GetController().GetActiveEntry();
if (!entry) {
// This can happen for popups created with window.open("").
return;
@@ -553,8 +554,7 @@ void TranslateManager::InitiateTranslationPosted(
void TranslateManager::TranslatePage(WebContents* web_contents,
const std::string& source_lang,
const std::string& target_lang) {
- content::NavigationEntry* entry =
- web_contents->GetController().GetActiveEntry();
+ NavigationEntry* entry = web_contents->GetController().GetActiveEntry();
if (!entry) {
NOTREACHED();
return;
@@ -586,8 +586,7 @@ void TranslateManager::TranslatePage(WebContents* web_contents,
}
void TranslateManager::RevertTranslation(WebContents* web_contents) {
- content::NavigationEntry* entry =
- web_contents->GetController().GetActiveEntry();
+ NavigationEntry* entry = web_contents->GetController().GetActiveEntry();
if (!entry) {
NOTREACHED();
return;
@@ -633,7 +632,7 @@ void TranslateManager::DoTranslatePage(WebContents* tab,
const std::string& translate_script,
const std::string& source_lang,
const std::string& target_lang) {
- content::NavigationEntry* entry = tab->GetController().GetActiveEntry();
+ NavigationEntry* entry = tab->GetController().GetActiveEntry();
if (!entry) {
NOTREACHED();
return;
diff --git a/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc b/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc
index 64f6930..908f4046 100644
--- a/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc
+++ b/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc
@@ -15,6 +15,8 @@
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
+using content::NavigationEntry;
+
BlockedContentTabHelper::BlockedContentTabHelper(
TabContentsWrapper* tab_contents)
: content::WebContentsObserver(tab_contents->web_contents()),
@@ -81,7 +83,7 @@ void BlockedContentTabHelper::AddPopup(TabContentsWrapper* new_contents,
// entry is the page to be loaded as we navigate away from the unloading
// page. For this reason, we can't use GetURL() to get the opener URL,
// because it returns the active entry.
- content::NavigationEntry* entry =
+ NavigationEntry* entry =
web_contents()->GetController().GetLastCommittedEntry();
GURL creator = entry ? entry->GetVirtualURL() : GURL::EmptyGURL();
Profile* profile =
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 4a92d74..a2116b5 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -207,6 +207,7 @@
#endif
using base::TimeDelta;
+using content::NavigationEntry;
using content::OpenURLParams;
using content::PluginService;
using content::Referrer;
@@ -252,7 +253,7 @@ const int kUIUpdateCoalescingTimeMS = 200;
const char kHashMark[] = "#";
// Returns |true| if entry has an internal chrome:// URL, |false| otherwise.
-bool HasInternalURL(const content::NavigationEntry* entry) {
+bool HasInternalURL(const NavigationEntry* entry) {
if (!entry)
return false;
@@ -1306,7 +1307,7 @@ TabContents* Browser::AddRestoredTab(
session_storage_namespace);
TabContents* new_tab = wrapper->tab_contents();
wrapper->extension_tab_helper()->SetExtensionAppById(extension_app_id);
- std::vector<content::NavigationEntry*> entries;
+ std::vector<NavigationEntry*> entries;
TabNavigation::CreateNavigationEntriesFromTabNavigations(
profile_, navigations, &entries);
new_tab->GetController().Restore(
@@ -1356,7 +1357,7 @@ void Browser::ReplaceRestoredTab(
session_storage_namespace);
wrapper->extension_tab_helper()->SetExtensionAppById(extension_app_id);
TabContents* replacement = wrapper->tab_contents();
- std::vector<content::NavigationEntry*> entries;
+ std::vector<NavigationEntry*> entries;
TabNavigation::CreateNavigationEntriesFromTabNavigations(
profile_, navigations, &entries);
replacement->GetController().Restore(
@@ -1548,8 +1549,7 @@ void Browser::ReloadInternal(WindowOpenDisposition disposition,
// If we are showing an interstitial, treat this as an OpenURL.
TabContents* current_tab = GetSelectedTabContents();
if (current_tab && current_tab->ShowingInterstitialPage()) {
- content::NavigationEntry* entry =
- current_tab->GetController().GetActiveEntry();
+ NavigationEntry* entry = current_tab->GetController().GetActiveEntry();
DCHECK(entry); // Should exist if interstitial is showing.
OpenURL(OpenURLParams(
entry->GetURL(), Referrer(), disposition,
@@ -2068,7 +2068,7 @@ void Browser::OpenCreateShortcutsDialog() {
web_app::IsValidUrl(current_tab->tab_contents()->GetURL())) <<
"Menu item should be disabled.";
- content::NavigationEntry* entry =
+ NavigationEntry* entry =
current_tab->tab_contents()->GetController().GetLastCommittedEntry();
if (!entry)
return;
@@ -2183,7 +2183,7 @@ void Browser::ShowAboutConflictsTab() {
void Browser::ShowBrokenPageTab(TabContents* contents) {
content::RecordAction(UserMetricsAction("ReportBug"));
string16 page_title = contents->GetTitle();
- content::NavigationEntry* entry = contents->GetController().GetActiveEntry();
+ NavigationEntry* entry = contents->GetController().GetActiveEntry();
if (!entry)
return;
std::string page_url = entry->GetURL().spec();
@@ -3545,8 +3545,7 @@ void Browser::LoadingStateChanged(TabContents* source) {
// last committed entry is not NULL. Last committed entry could be NULL
// when an interstitial page is injected (e.g. bad https certificate,
// malware site etc). When this happens, we abort the shortcut update.
- content::NavigationEntry* entry =
- source->GetController().GetLastCommittedEntry();
+ NavigationEntry* entry = source->GetController().GetLastCommittedEntry();
if (entry) {
TabContentsWrapper::GetCurrentWrapperForContents(source)->
extension_tab_helper()->GetApplicationInfo(entry->GetPageID());
@@ -3991,7 +3990,7 @@ void Browser::OnDidGetApplicationInfo(TabContentsWrapper* source,
if (GetSelectedTabContentsWrapper() != source)
return;
- content::NavigationEntry* entry =
+ NavigationEntry* entry =
source->tab_contents()->GetController().GetLastCommittedEntry();
if (!entry || (entry->GetPageID() != page_id))
return;
@@ -5211,7 +5210,7 @@ void Browser::CreateInstantIfNecessary() {
void Browser::ViewSource(TabContentsWrapper* contents) {
DCHECK(contents);
- content::NavigationEntry* active_entry =
+ NavigationEntry* active_entry =
contents->tab_contents()->GetController().GetActiveEntry();
if (!active_entry)
return;
@@ -5227,7 +5226,7 @@ void Browser::ViewSource(TabContentsWrapper* contents,
TabContentsWrapper* view_source_contents = contents->Clone();
view_source_contents->tab_contents()->GetController().PruneAllButActive();
- content::NavigationEntry* active_entry =
+ NavigationEntry* active_entry =
view_source_contents->tab_contents()->GetController().GetActiveEntry();
if (!active_entry)
return;
@@ -5282,7 +5281,7 @@ int Browser::GetContentRestrictionsForSelectedTab() {
TabContents* current_tab = GetSelectedTabContents();
if (current_tab) {
content_restrictions = current_tab->GetContentRestrictions();
- content::NavigationEntry* active_entry =
+ NavigationEntry* active_entry =
current_tab->GetController().GetActiveEntry();
// See comment in UpdateCommandsForTabState about why we call url().
if (!SavePackage::IsSavableURL(
diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc
index f8c9174a..97ece1e 100644
--- a/chrome/browser/ui/browser_browsertest.cc
+++ b/chrome/browser/ui/browser_browsertest.cc
@@ -62,6 +62,7 @@
#include "chrome/browser/browser_process.h"
#endif
+using content::NavigationEntry;
using content::OpenURLParams;
using content::Referrer;
using content::WebContents;
@@ -668,7 +669,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest,
ui_test_utils::NavigateToURL(browser(), url);
- content::NavigationEntry* entry = browser()->GetSelectedTabContents()->
+ NavigationEntry* entry = browser()->GetSelectedTabContents()->
GetController().GetActiveEntry();
EXPECT_EQ(expected_favicon_url.spec(), entry->GetFavicon().url.spec());
}
@@ -688,7 +689,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_FaviconChange) {
ASSERT_TRUE(file_url.SchemeIs(chrome::kFileScheme));
ui_test_utils::NavigateToURL(browser(), file_url);
- content::NavigationEntry* entry = browser()->GetSelectedTabContents()->
+ NavigationEntry* entry = browser()->GetSelectedTabContents()->
GetController().GetActiveEntry();
static const FilePath::CharType* kIcon =
FILE_PATH_LITERAL("test1.png");
diff --git a/chrome/browser/ui/cocoa/applescript/tab_applescript.mm b/chrome/browser/ui/cocoa/applescript/tab_applescript.mm
index 299e999..323e17e 100644
--- a/chrome/browser/ui/cocoa/applescript/tab_applescript.mm
+++ b/chrome/browser/ui/cocoa/applescript/tab_applescript.mm
@@ -26,6 +26,7 @@
#include "content/public/browser/web_contents_delegate.h"
#include "googleurl/src/gurl.h"
+using content::NavigationEntry;
using content::OpenURLParams;
using content::Referrer;
@@ -189,7 +190,7 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
return nil;
}
- content::NavigationEntry* entry =
+ NavigationEntry* entry =
tabContents_->tab_contents()->GetController().GetActiveEntry();
if (!entry) {
return nil;
@@ -213,7 +214,7 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
return;
}
- content::NavigationEntry* entry =
+ NavigationEntry* entry =
tabContents_->tab_contents()->GetController().GetActiveEntry();
if (!entry)
return;
@@ -228,7 +229,7 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
}
- (NSString*)title {
- content::NavigationEntry* entry =
+ NavigationEntry* entry =
tabContents_->tab_contents()->GetController().GetActiveEntry();
if (!entry)
return nil;
@@ -390,7 +391,7 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
}
- (void)handlesViewSourceScriptCommand:(NSScriptCommand*)command {
- content::NavigationEntry* entry =
+ NavigationEntry* entry =
tabContents_->tab_contents()->GetController().GetLastCommittedEntry();
if (entry) {
tabContents_->tab_contents()->OpenURL(OpenURLParams(
diff --git a/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm b/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
index 127cb21..8923653 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
@@ -15,6 +15,8 @@
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/l10n/l10n_util_mac.h"
+using content::NavigationEntry;
+
// The info-bubble point should look like it points to the bottom of the lock
// icon. Determined with Pixie.app.
const CGFloat kBubblePointYOffset = 2.0;
@@ -95,7 +97,7 @@ bool LocationIconDecoration::OnMousePressed(NSRect frame) {
return true;
TabContents* tab = owner_->GetTabContents();
- content::NavigationEntry* nav_entry = tab->GetController().GetActiveEntry();
+ NavigationEntry* nav_entry = tab->GetController().GetActiveEntry();
if (!nav_entry) {
NOTREACHED();
return true;
diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.cc b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
index f3ee402..f05f815 100644
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.cc
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
@@ -70,6 +70,7 @@
#include "ui/gfx/image/image.h"
#include "webkit/glue/window_open_disposition.h"
+using content::NavigationEntry;
using content::OpenURLParams;
namespace {
@@ -1047,7 +1048,7 @@ gboolean LocationBarViewGtk::OnIconReleased(GtkWidget* sender,
if (event->x == 0 && event->y == 0)
return FALSE;
- content::NavigationEntry* nav_entry = tab->GetController().GetActiveEntry();
+ NavigationEntry* nav_entry = tab->GetController().GetActiveEntry();
if (!nav_entry) {
NOTREACHED();
return FALSE;
diff --git a/chrome/browser/ui/search_engines/search_engine_tab_helper.cc b/chrome/browser/ui/search_engines/search_engine_tab_helper.cc
index 21ce12b..1c02b63 100644
--- a/chrome/browser/ui/search_engines/search_engine_tab_helper.cc
+++ b/chrome/browser/ui/search_engines/search_engine_tab_helper.cc
@@ -16,12 +16,13 @@
#include "content/public/browser/web_contents.h"
#include "content/public/common/frame_navigate_params.h"
+using content::NavigationEntry;
using content::WebContents;
namespace {
// Returns true if the entry's transition type is FORM_SUBMIT.
-bool IsFormSubmit(const content::NavigationEntry* entry) {
+bool IsFormSubmit(const NavigationEntry* entry) {
return (content::PageTransitionStripQualifier(entry->GetTransitionType()) ==
content::PAGE_TRANSITION_FORM_SUBMIT);
}
@@ -91,10 +92,10 @@ void SearchEngineTabHelper::OnPageHasOSDD(
}
const NavigationController& controller = web_contents()->GetController();
- const content::NavigationEntry* entry = controller.GetLastCommittedEntry();
+ const NavigationEntry* entry = controller.GetLastCommittedEntry();
DCHECK(entry);
- const content::NavigationEntry* base_entry = entry;
+ const NavigationEntry* base_entry = entry;
if (IsFormSubmit(base_entry)) {
// If the current page is a form submit, find the last page that was not
// a form submit and use its url to generate the keyword from.
@@ -148,7 +149,7 @@ void SearchEngineTabHelper::GenerateKeywordIfNecessary(
// happen in new tabs.
if (last_index <= 0)
return;
- const content::NavigationEntry* previous_entry =
+ const NavigationEntry* previous_entry =
controller.GetEntryAtIndex(last_index - 1);
if (IsFormSubmit(previous_entry)) {
// Only generate a keyword if the previous page wasn't itself a form
diff --git a/chrome/browser/ui/sync/tab_contents_wrapper_synced_tab_delegate.cc b/chrome/browser/ui/sync/tab_contents_wrapper_synced_tab_delegate.cc
index 623fee8..f4138d5 100644
--- a/chrome/browser/ui/sync/tab_contents_wrapper_synced_tab_delegate.cc
+++ b/chrome/browser/ui/sync/tab_contents_wrapper_synced_tab_delegate.cc
@@ -12,6 +12,8 @@
#include "chrome/common/extensions/extension.h"
#include "content/public/browser/navigation_entry.h"
+using content::NavigationEntry;
+
TabContentsWrapperSyncedTabDelegate::TabContentsWrapperSyncedTabDelegate(
TabContentsWrapper* tab_contents_wrapper)
: tab_contents_wrapper_(tab_contents_wrapper) {}
@@ -59,21 +61,18 @@ int TabContentsWrapperSyncedTabDelegate::GetPendingEntryIndex() const {
pending_entry_index();
}
-content::NavigationEntry*
- TabContentsWrapperSyncedTabDelegate::GetPendingEntry() const {
+NavigationEntry* TabContentsWrapperSyncedTabDelegate::GetPendingEntry() const {
return
tab_contents_wrapper_->tab_contents()->GetController().GetPendingEntry();
}
-content::NavigationEntry*
- TabContentsWrapperSyncedTabDelegate::GetEntryAtIndex(int i)
+NavigationEntry* TabContentsWrapperSyncedTabDelegate::GetEntryAtIndex(int i)
const {
return
tab_contents_wrapper_->tab_contents()->GetController().GetEntryAtIndex(i);
}
-content::NavigationEntry*
- TabContentsWrapperSyncedTabDelegate::GetActiveEntry() const {
+NavigationEntry* TabContentsWrapperSyncedTabDelegate::GetActiveEntry() const {
return
tab_contents_wrapper_->tab_contents()->GetController().GetActiveEntry();
}
diff --git a/chrome/browser/ui/toolbar/back_forward_menu_model.cc b/chrome/browser/ui/toolbar/back_forward_menu_model.cc
index 9c4932b..093cb92 100644
--- a/chrome/browser/ui/toolbar/back_forward_menu_model.cc
+++ b/chrome/browser/ui/toolbar/back_forward_menu_model.cc
@@ -29,6 +29,7 @@
#include "ui/base/text/text_elider.h"
#include "ui/gfx/codec/png_codec.h"
+using content::NavigationEntry;
using content::UserMetricsAction;
const int BackForwardMenuModel::kMaxHistoryItems = 12;
@@ -90,7 +91,7 @@ string16 BackForwardMenuModel::GetLabelAt(int index) const {
// Return the entry title, escaping any '&' characters and eliding it if it's
// super long.
- content::NavigationEntry* entry = GetNavigationEntry(index);
+ NavigationEntry* entry = GetNavigationEntry(index);
Profile* profile =
Profile::FromBrowserContext(GetTabContents()->GetBrowserContext());
string16 menu_text(entry->GetTitleForDisplay(
@@ -135,7 +136,7 @@ bool BackForwardMenuModel::GetIconAt(int index, SkBitmap* icon) {
*icon = *ResourceBundle::GetSharedInstance().GetBitmapNamed(
IDR_HISTORY_FAVICON);
} else {
- content::NavigationEntry* entry = GetNavigationEntry(index);
+ NavigationEntry* entry = GetNavigationEntry(index);
*icon = entry->GetFavicon().bitmap;
if (!entry->GetFavicon().valid && menu_model_delegate()) {
FetchFavicon(entry);
@@ -223,7 +224,7 @@ void BackForwardMenuModel::SetMenuModelDelegate(
menu_model_delegate_ = menu_model_delegate;
}
-void BackForwardMenuModel::FetchFavicon(content::NavigationEntry* entry) {
+void BackForwardMenuModel::FetchFavicon(NavigationEntry* entry) {
// If the favicon has already been requested for this menu, don't do
// anything.
if (requested_favicons_.find(entry->GetUniqueID()) !=
@@ -248,7 +249,7 @@ void BackForwardMenuModel::OnFavIconDataAvailable(
if (favicon.is_valid()) {
int unique_id = load_consumer_.GetClientDataForCurrentRequest();
// Find the current model_index for the unique_id.
- content::NavigationEntry* entry = NULL;
+ NavigationEntry* entry = NULL;
int model_index = -1;
for (int i = 0; i < GetItemCount() - 1; i++) {
if (IsSeparator(i))
@@ -348,8 +349,7 @@ int BackForwardMenuModel::GetIndexOfNextChapterStop(int start_from,
}
}
- content::NavigationEntry* start_entry =
- controller.GetEntryAtIndex(start_from);
+ NavigationEntry* start_entry = controller.GetEntryAtIndex(start_from);
const GURL& url = start_entry->GetURL();
if (!forward) {
@@ -440,8 +440,7 @@ int BackForwardMenuModel::MenuIndexToNavEntryIndex(int index) const {
return index;
}
-content::NavigationEntry* BackForwardMenuModel::GetNavigationEntry(
- int index) const {
+NavigationEntry* BackForwardMenuModel::GetNavigationEntry(int index) const {
int controller_index = MenuIndexToNavEntryIndex(index);
NavigationController& controller = GetTabContents()->GetController();
if (controller_index >= 0 && controller_index < controller.entry_count())
diff --git a/chrome/browser/ui/toolbar/toolbar_model.cc b/chrome/browser/ui/toolbar/toolbar_model.cc
index 9b5ae86..3db97da 100644
--- a/chrome/browser/ui/toolbar/toolbar_model.cc
+++ b/chrome/browser/ui/toolbar/toolbar_model.cc
@@ -27,6 +27,7 @@
#include "net/base/net_util.h"
#include "ui/base/l10n/l10n_util.h"
+using content::NavigationEntry;
using content::SSLStatus;
ToolbarModel::ToolbarModel(Browser* browser)
@@ -47,7 +48,7 @@ string16 ToolbarModel::GetText() const {
Profile* profile =
Profile::FromBrowserContext(navigation_controller->browser_context());
languages = profile->GetPrefs()->GetString(prefs::kAcceptLanguages);
- content::NavigationEntry* entry = navigation_controller->GetVisibleEntry();
+ NavigationEntry* entry = navigation_controller->GetVisibleEntry();
if (!ShouldDisplayURL()) {
url = GURL();
} else if (entry) {
@@ -73,8 +74,7 @@ bool ToolbarModel::ShouldDisplayURL() const {
// of view-source:chrome://newtab, which should display its URL despite what
// chrome://newtab's WebUI says.
NavigationController* controller = GetNavigationController();
- content::NavigationEntry* entry =
- controller ? controller->GetVisibleEntry() : NULL;
+ NavigationEntry* entry = controller ? controller->GetVisibleEntry() : NULL;
if (entry) {
if (entry->IsViewSourceMode() ||
entry->GetPageType() == content::PAGE_TYPE_INTERSTITIAL) {
@@ -100,7 +100,7 @@ ToolbarModel::SecurityLevel ToolbarModel::GetSecurityLevel() const {
if (!navigation_controller) // We might not have a controller on init.
return NONE;
- content::NavigationEntry* entry = navigation_controller->GetVisibleEntry();
+ NavigationEntry* entry = navigation_controller->GetVisibleEntry();
if (!entry)
return NONE;
diff --git a/chrome/browser/ui/views/location_bar/click_handler.cc b/chrome/browser/ui/views/location_bar/click_handler.cc
index b6bbc35..a4f7a5d 100644
--- a/chrome/browser/ui/views/location_bar/click_handler.cc
+++ b/chrome/browser/ui/views/location_bar/click_handler.cc
@@ -11,6 +11,8 @@
#include "content/public/browser/navigation_entry.h"
#include "ui/views/view.h"
+using content::NavigationEntry;
+
ClickHandler::ClickHandler(const views::View* owner,
LocationBarView* location_bar)
: owner_(owner),
@@ -27,7 +29,7 @@ void ClickHandler::OnMouseReleased(const views::MouseEvent& event) {
return;
TabContents* tab = location_bar_->GetTabContentsWrapper()->tab_contents();
- content::NavigationEntry* nav_entry = tab->GetController().GetActiveEntry();
+ NavigationEntry* nav_entry = tab->GetController().GetActiveEntry();
if (!nav_entry) {
NOTREACHED();
return;
diff --git a/chrome/browser/ui/webui/cloud_print_signin_dialog.cc b/chrome/browser/ui/webui/cloud_print_signin_dialog.cc
index 1374586..679b013 100644
--- a/chrome/browser/ui/webui/cloud_print_signin_dialog.cc
+++ b/chrome/browser/ui/webui/cloud_print_signin_dialog.cc
@@ -28,6 +28,7 @@
#include "content/public/browser/notification_types.h"
using content::BrowserThread;
+using content::NavigationEntry;
using content::WebContents;
// This module implements a sign in dialog for cloud print.
@@ -64,7 +65,7 @@ void CloudPrintSigninFlowHandler::RegisterMessages() {
if (web_ui_ && web_ui_->tab_contents()) {
NavigationController* controller =
&web_ui_->tab_contents()->GetController();
- content::NavigationEntry* pending_entry = controller->GetPendingEntry();
+ NavigationEntry* pending_entry = controller->GetPendingEntry();
if (pending_entry)
pending_entry->SetURL(CloudPrintURL(
Profile::FromWebUI(web_ui_)).GetCloudPrintSigninURL());
diff --git a/chrome/browser/ui/webui/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview_handler.cc
index 1c6600a..88bdc2d 100644
--- a/chrome/browser/ui/webui/print_preview_handler.cc
+++ b/chrome/browser/ui/webui/print_preview_handler.cc
@@ -58,6 +58,7 @@
#endif
using content::BrowserThread;
+using content::NavigationEntry;
using content::OpenURLParams;
using content::Referrer;
using printing::Metafile;
@@ -314,7 +315,7 @@ void PrintPreviewHandler::HandleGetPreview(const ListValue* args) {
settings->SetString(printing::kSettingHeaderFooterTitle,
initiator_tab->tab_contents()->GetTitle());
std::string url;
- content::NavigationEntry* entry =
+ NavigationEntry* entry =
initiator_tab->tab_contents()->GetController().GetActiveEntry();
if (entry)
url = entry->GetVirtualURL().spec();