summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-10 18:12:23 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-10 18:12:23 +0000
commit7b1020c20c90b4ef57837e89135cbceb74d8dfc8 (patch)
treec6fb4caaf464b5b27868f95be7bedcee93c87e79 /chrome
parente62090e3bd77a23a23e350d38776fd56dd8c74fc (diff)
downloadchromium_src-7b1020c20c90b4ef57837e89135cbceb74d8dfc8.zip
chromium_src-7b1020c20c90b4ef57837e89135cbceb74d8dfc8.tar.gz
chromium_src-7b1020c20c90b4ef57837e89135cbceb74d8dfc8.tar.bz2
If you click a link to a malware page or if a page redirects to malware, the malware blocking page is shown but it says that the malware page is a resource of the originating page.
This is because the blocking page was using the page URL to determine if we are dealing with the main frame, and in these cases the URL was not set yet. BUG=1335251 TEST=Navigate to a page that has a link to malware. Click on the link. The malware blocking page should be displayed and should indicate that the page is malware (and not that the originating page contains malware). Review URL: http://codereview.chromium.org/1881 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1998 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_blocking_page.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
index 2342827..c5d0fe1 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
@@ -106,8 +106,7 @@ void SafeBrowsingBlockingPage::DisplayBlockingPage() {
// Check to see if we're blocking the main page, or a sub-resource on the
// main page.
- GURL top_url = tab_->GetURL();
- if (top_url == url_) {
+ if (is_main_frame_) {
strings.SetString(L"description1",
l10n_util::GetStringF(IDS_SAFE_BROWSING_MALWARE_DESCRIPTION1,
UTF8ToWide(url_.host())));
@@ -118,7 +117,7 @@ void SafeBrowsingBlockingPage::DisplayBlockingPage() {
} else {
strings.SetString(L"description1",
l10n_util::GetStringF(IDS_SAFE_BROWSING_MALWARE_DESCRIPTION4,
- UTF8ToWide(top_url.host()),
+ UTF8ToWide(tab_->GetURL().host()),
UTF8ToWide(url_.host())));
strings.SetString(L"description2",
l10n_util::GetStringF(IDS_SAFE_BROWSING_MALWARE_DESCRIPTION5,