Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(428)

Unified Diff: chrome/browser/extensions/api/web_navigation/web_navigation_api.cc

Issue 10785018: Send an webNavigation.onErrorOccurred when a load fails after the initial navigation was committed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc b/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
index 6ce004363506e563ed12022857eae326f71ec738..55a6daa4b70ae05351ba1af0123255710b37062b 100644
--- a/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
+++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
@@ -727,6 +727,19 @@ void WebNavigationTabObserver::DidFinishLoad(
frame_id);
}
+void WebNavigationTabObserver::DidFailLoad(
+ int64 frame_id,
+ const GURL& validated_url,
+ bool is_main_frame,
+ int error_code,
+ const string16& error_description) {
+ if (!navigation_state_.CanSendEvents(frame_id))
+ return;
+ navigation_state_.SetErrorOccurredInFrame(frame_id);
+ DispatchOnErrorOccurred(
+ web_contents(), validated_url, frame_id, is_main_frame, error_code);
+}
+
void WebNavigationTabObserver::DidOpenRequestedURL(
WebContents* new_contents,
const GURL& url,

Powered by Google App Engine
This is Rietveld 408576698