summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-23 21:30:33 +0000
committerxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-23 21:30:33 +0000
commit867dff8e938a29912bf64ec47939018aa2b9be1c (patch)
tree56c5a0436c70c391c0961a3569ff909b74402768
parent64747810906162dda8a49bfab5dd15036be67228 (diff)
downloadchromium_src-867dff8e938a29912bf64ec47939018aa2b9be1c.zip
chromium_src-867dff8e938a29912bf64ec47939018aa2b9be1c.tar.gz
chromium_src-867dff8e938a29912bf64ec47939018aa2b9be1c.tar.bz2
Abort shortcut update on interstitial page.
BUG=42254 TEST=Verify fix for issue 42254. Review URL: http://codereview.chromium.org/1699006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45492 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/browser.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index fe7f95e..714268c 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -2294,13 +2294,15 @@ void Browser::LoadingStateChanged(TabContents* source) {
if (!source->is_loading() &&
pending_web_app_action_ == UPDATE_SHORTCUT) {
- // Schedule a shortcut update when web application info is available.
+ // Schedule a shortcut update when web application info is available if
+ // 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.
NavigationEntry* entry = source->controller().GetLastCommittedEntry();
if (entry) {
source->render_view_host()->GetApplicationInfo(entry->page_id());
} else {
pending_web_app_action_ = NONE;
- NOTREACHED();
}
}
}