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

Side by Side Diff: chrome/browser/extensions/extension_webnavigation_api.cc

Issue 8142032: Add error description to the DidFailProvisionalLoad callback. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebase Created 9 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Implements the Chrome Extensions WebNavigation API. 5 // Implements the Chrome Extensions WebNavigation API.
6 6
7 #include "chrome/browser/extensions/extension_webnavigation_api.h" 7 #include "chrome/browser/extensions/extension_webnavigation_api.h"
8 8
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 is_main_frame, 540 is_main_frame,
541 url, 541 url,
542 transition_type); 542 transition_type);
543 } 543 }
544 } 544 }
545 545
546 void ExtensionWebNavigationTabObserver::DidFailProvisionalLoad( 546 void ExtensionWebNavigationTabObserver::DidFailProvisionalLoad(
547 int64 frame_id, 547 int64 frame_id,
548 bool is_main_frame, 548 bool is_main_frame,
549 const GURL& validated_url, 549 const GURL& validated_url,
550 int error_code) { 550 int error_code,
551 const string16& error_description) {
551 if (!navigation_state_.CanSendEvents(frame_id)) 552 if (!navigation_state_.CanSendEvents(frame_id))
552 return; 553 return;
553 navigation_state_.SetErrorOccurredInFrame(frame_id); 554 navigation_state_.SetErrorOccurredInFrame(frame_id);
554 DispatchOnErrorOccurred( 555 DispatchOnErrorOccurred(
555 tab_contents(), validated_url, frame_id, is_main_frame, error_code); 556 tab_contents(), validated_url, frame_id, is_main_frame, error_code);
556 } 557 }
557 558
558 void ExtensionWebNavigationTabObserver::DocumentLoadedInFrame( 559 void ExtensionWebNavigationTabObserver::DocumentLoadedInFrame(
559 int64 frame_id) { 560 int64 frame_id) {
560 if (!navigation_state_.CanSendEvents(frame_id)) 561 if (!navigation_state_.CanSendEvents(frame_id))
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 keys::kFrameIdKey, 720 keys::kFrameIdKey,
720 GetFrameId(navigation_state.IsMainFrame(*frame), *frame)); 721 GetFrameId(navigation_state.IsMainFrame(*frame), *frame));
721 frameDict->SetBoolean( 722 frameDict->SetBoolean(
722 keys::kErrorOccurredKey, 723 keys::kErrorOccurredKey,
723 navigation_state.GetErrorOccurredInFrame(*frame)); 724 navigation_state.GetErrorOccurredInFrame(*frame));
724 resultList->Append(frameDict); 725 resultList->Append(frameDict);
725 } 726 }
726 result_.reset(resultList); 727 result_.reset(resultList);
727 return true; 728 return true;
728 } 729 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_webnavigation_api.h ('k') | chrome/renderer/chrome_content_renderer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698