summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/frame_sniffer.cc
diff options
context:
space:
mode:
authorzelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-27 19:17:17 +0000
committerzelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-27 19:17:17 +0000
commitebce95222a33462b0fca589d6c3bd4da559a19d9 (patch)
treef3c61fe05c5b87ab37b2325fc6cc2c99d0f91549 /chrome/renderer/frame_sniffer.cc
parent65d54260dd1bd4d5ddfde3a728e410f9d8cb467a (diff)
downloadchromium_src-ebce95222a33462b0fca589d6c3bd4da559a19d9.zip
chromium_src-ebce95222a33462b0fca589d6c3bd4da559a19d9.tar.gz
chromium_src-ebce95222a33462b0fca589d6c3bd4da559a19d9.tar.bz2
Added logic that will retry to reload+reconnect the mobile payment portal page 5 times before it eventually gives up and shows service unavailable error.
Expanded frame sniffer to send an event when a frame which is being watched gets finally loaded. From the sent error (or its absence) and this new event, we can finally reconstruct on the browser side if a given iframe was loaded successfully or not. BUG=chromium-os:20525, chromium-os:21738 TEST=tricky one to test since it repros on 3g network flakyness. one can edit /usr/lib/cromo/config/madison.ini and put a bad value for olp_root there to trigger this. Review URL: http://codereview.chromium.org/8341037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107613 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/frame_sniffer.cc')
-rw-r--r--chrome/renderer/frame_sniffer.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/renderer/frame_sniffer.cc b/chrome/renderer/frame_sniffer.cc
index 317329f..b9e2ec5 100644
--- a/chrome/renderer/frame_sniffer.cc
+++ b/chrome/renderer/frame_sniffer.cc
@@ -18,12 +18,19 @@ FrameSniffer::~FrameSniffer() {
}
void FrameSniffer::DidFailProvisionalLoad(WebKit::WebFrame* frame,
- const WebKit::WebURLError& error) {
+ const WebKit::WebURLError& error) {
if (!ShouldSniffFrame(frame))
return;
Send(new ChromeViewHostMsg_FrameLoadingError(routing_id(), -error.reason));
}
+void FrameSniffer::DidCommitProvisionalLoad(WebKit::WebFrame* frame,
+ bool is_new_navigation) {
+ if (!ShouldSniffFrame(frame))
+ return;
+ Send(new ChromeViewHostMsg_FrameLoadingCompleted(routing_id()));
+}
+
bool FrameSniffer::ShouldSniffFrame(WebKit::WebFrame* frame) {
return frame->name() == frame_name_;
}