summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-02 19:08:56 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-02 19:08:56 +0000
commit606843faf131685e7802df12f2ee97efc7cf2f3b (patch)
treef4d494147c9190ba22c370148ab5aab2020f6d1a /chrome/browser
parent63e78057b6ae2685ed3525d832fed48b7c85ee1e (diff)
downloadchromium_src-606843faf131685e7802df12f2ee97efc7cf2f3b.zip
chromium_src-606843faf131685e7802df12f2ee97efc7cf2f3b.tar.gz
chromium_src-606843faf131685e7802df12f2ee97efc7cf2f3b.tar.bz2
Remove the URL and title from the state getting functions and IPC messages.
If the title or URL changes, we'll be updated in other ways, so this extra processing is wasted. Review URL: http://codereview.chromium.org/12859 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6225 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/render_view_host.cc8
-rw-r--r--chrome/browser/render_view_host.h2
-rw-r--r--chrome/browser/render_view_host_delegate.h2
-rw-r--r--chrome/browser/web_contents.cc23
-rw-r--r--chrome/browser/web_contents.h2
5 files changed, 4 insertions, 33 deletions
diff --git a/chrome/browser/render_view_host.cc b/chrome/browser/render_view_host.cc
index 38bbe9e..77512b6 100644
--- a/chrome/browser/render_view_host.cc
+++ b/chrome/browser/render_view_host.cc
@@ -832,14 +832,8 @@ void RenderViewHost::OnMsgNavigate(const IPC::Message& msg) {
}
void RenderViewHost::OnMsgUpdateState(int32 page_id,
- const GURL& url,
- const std::wstring& title,
const std::string& state) {
- GURL validated_url(url);
- FilterURL(RendererSecurityPolicy::GetInstance(),
- process()->host_id(), &validated_url);
-
- delegate_->UpdateState(this, page_id, validated_url, title, state);
+ delegate_->UpdateState(this, page_id, state);
}
void RenderViewHost::OnMsgUpdateTitle(int32 page_id,
diff --git a/chrome/browser/render_view_host.h b/chrome/browser/render_view_host.h
index b7d1ae2..5ccd88f 100644
--- a/chrome/browser/render_view_host.h
+++ b/chrome/browser/render_view_host.h
@@ -420,8 +420,6 @@ class RenderViewHost : public RenderWidgetHost {
void OnMsgRendererGone();
void OnMsgNavigate(const IPC::Message& msg);
void OnMsgUpdateState(int32 page_id,
- const GURL& url,
- const std::wstring& title,
const std::string& state);
void OnMsgUpdateTitle(int32 page_id, const std::wstring& title);
void OnMsgUpdateEncoding(const std::wstring& encoding);
diff --git a/chrome/browser/render_view_host_delegate.h b/chrome/browser/render_view_host_delegate.h
index 63e2eaa..f0c4b0e 100644
--- a/chrome/browser/render_view_host_delegate.h
+++ b/chrome/browser/render_view_host_delegate.h
@@ -160,8 +160,6 @@ class RenderViewHostDelegate {
// The state for the page changed and should be updated.
virtual void UpdateState(RenderViewHost* render_view_host,
int32 page_id,
- const GURL& url,
- const std::wstring& title,
const std::string& state) { }
// The page's title was changed and should be updated.
diff --git a/chrome/browser/web_contents.cc b/chrome/browser/web_contents.cc
index 4afc290..1191d5d 100644
--- a/chrome/browser/web_contents.cc
+++ b/chrome/browser/web_contents.cc
@@ -745,8 +745,6 @@ void WebContents::DidNavigate(RenderViewHost* rvh,
void WebContents::UpdateState(RenderViewHost* rvh,
int32 page_id,
- const GURL& url,
- const std::wstring& title,
const std::string& state) {
if (rvh != render_view_host() ||
render_manager_.showing_interstitial_page()) {
@@ -774,27 +772,12 @@ void WebContents::UpdateState(RenderViewHost* rvh,
if (entry_index < 0)
return;
NavigationEntry* entry = controller()->GetEntryAtIndex(entry_index);
- unsigned changed_flags = 0;
-
- // Update the URL.
- if (url != entry->url()) {
- changed_flags |= INVALIDATE_URL;
- if (entry == controller()->GetActiveEntry())
- fav_icon_helper_.FetchFavIcon(url);
- entry->set_url(url);
- }
-
- // Save the new title if it changed.
- if (UpdateTitleForEntry(entry, title))
- changed_flags |= INVALIDATE_TITLE;
- // Update the state (forms, etc.).
- if (state != entry->content_state())
- entry->set_content_state(state);
+ if (state == entry->content_state())
+ return; // Nothing to update.
+ entry->set_content_state(state);
// Notify everybody of the changes (only when the current page changed).
- if (changed_flags && entry == controller()->GetActiveEntry())
- NotifyNavigationStateChanged(changed_flags);
controller()->NotifyEntryChanged(entry, entry_index);
}
diff --git a/chrome/browser/web_contents.h b/chrome/browser/web_contents.h
index efe7a10..f7ed61e 100644
--- a/chrome/browser/web_contents.h
+++ b/chrome/browser/web_contents.h
@@ -231,8 +231,6 @@ class WebContents : public TabContents,
const ViewHostMsg_FrameNavigate_Params& params);
virtual void UpdateState(RenderViewHost* render_view_host,
int32 page_id,
- const GURL& url,
- const std::wstring& title,
const std::string& state);
virtual void UpdateTitle(RenderViewHost* render_view_host,
int32 page_id,