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

Side by Side Diff: chrome/browser/extensions/api/web_navigation/web_navigation_api.cc

Issue 184873004: Update resource requests to remove redundant frame ID. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update comments Created 6 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/web_request/web_request_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/api/web_navigation/web_navigation_api.h" 7 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h"
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 navigation_state_.SetErrorOccurredInFrame(frame_id); 584 navigation_state_.SetErrorOccurredInFrame(frame_id);
585 } 585 }
586 586
587 void WebNavigationTabObserver::DidGetRedirectForResourceRequest( 587 void WebNavigationTabObserver::DidGetRedirectForResourceRequest(
588 content::RenderViewHost* render_view_host, 588 content::RenderViewHost* render_view_host,
589 const content::ResourceRedirectDetails& details) { 589 const content::ResourceRedirectDetails& details) {
590 if (details.resource_type != ResourceType::MAIN_FRAME && 590 if (details.resource_type != ResourceType::MAIN_FRAME &&
591 details.resource_type != ResourceType::SUB_FRAME) { 591 details.resource_type != ResourceType::SUB_FRAME) {
592 return; 592 return;
593 } 593 }
594 FrameNavigationState::FrameID frame_id(details.frame_id, render_view_host); 594 FrameNavigationState::FrameID frame_id(details.render_frame_id,
595 render_view_host);
595 navigation_state_.SetIsServerRedirected(frame_id); 596 navigation_state_.SetIsServerRedirected(frame_id);
596 } 597 }
597 598
598 void WebNavigationTabObserver::DidOpenRequestedURL( 599 void WebNavigationTabObserver::DidOpenRequestedURL(
599 content::WebContents* new_contents, 600 content::WebContents* new_contents,
600 const GURL& url, 601 const GURL& url,
601 const content::Referrer& referrer, 602 const content::Referrer& referrer,
602 WindowOpenDisposition disposition, 603 WindowOpenDisposition disposition,
603 content::PageTransition transition, 604 content::PageTransition transition,
604 int64 source_frame_num) { 605 int64 source_frame_num) {
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 void WebNavigationAPI::OnListenerAdded(const EventListenerInfo& details) { 841 void WebNavigationAPI::OnListenerAdded(const EventListenerInfo& details) {
841 web_navigation_event_router_.reset(new WebNavigationEventRouter( 842 web_navigation_event_router_.reset(new WebNavigationEventRouter(
842 Profile::FromBrowserContext(browser_context_))); 843 Profile::FromBrowserContext(browser_context_)));
843 ExtensionSystem::Get(browser_context_)->event_router()->UnregisterObserver( 844 ExtensionSystem::Get(browser_context_)->event_router()->UnregisterObserver(
844 this); 845 this);
845 } 846 }
846 847
847 #endif // OS_ANDROID 848 #endif // OS_ANDROID
848 849
849 } // namespace extensions 850 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/web_request/web_request_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698