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

Side by Side Diff: chrome/renderer/render_view.cc

Issue 6488010: Propagate the remote socket address to URLRequest and to ViewHostMsg_FrameNavigate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address eroman's comments Created 9 years, 10 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 #include "chrome/renderer/render_view.h" 5 #include "chrome/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 1614 matching lines...) Expand 10 before | Expand all | Expand 10 after
1625 1625
1626 NavigationState* navigation_state = NavigationState::FromDataSource(ds); 1626 NavigationState* navigation_state = NavigationState::FromDataSource(ds);
1627 DCHECK(navigation_state); 1627 DCHECK(navigation_state);
1628 1628
1629 ViewHostMsg_FrameNavigate_Params params; 1629 ViewHostMsg_FrameNavigate_Params params;
1630 params.http_status_code = response.httpStatusCode(); 1630 params.http_status_code = response.httpStatusCode();
1631 params.is_post = false; 1631 params.is_post = false;
1632 params.page_id = page_id_; 1632 params.page_id = page_id_;
1633 params.frame_id = frame->identifier(); 1633 params.frame_id = frame->identifier();
1634 params.is_content_filtered = response.isContentFiltered(); 1634 params.is_content_filtered = response.isContentFiltered();
1635 params.socket_address.set_host(response.remoteIPAddress().utf8());
1636 params.socket_address.set_port(response.remotePort());
1635 params.was_within_same_page = navigation_state->was_within_same_page(); 1637 params.was_within_same_page = navigation_state->was_within_same_page();
1636 if (!navigation_state->security_info().empty()) { 1638 if (!navigation_state->security_info().empty()) {
1637 // SSL state specified in the request takes precedence over the one in the 1639 // SSL state specified in the request takes precedence over the one in the
1638 // response. 1640 // response.
1639 // So far this is only intended for error pages that are not expected to be 1641 // So far this is only intended for error pages that are not expected to be
1640 // over ssl, so we should not get any clash. 1642 // over ssl, so we should not get any clash.
1641 DCHECK(response.securityInfo().isEmpty()); 1643 DCHECK(response.securityInfo().isEmpty());
1642 params.security_info = navigation_state->security_info(); 1644 params.security_info = navigation_state->security_info();
1643 } else { 1645 } else {
1644 params.security_info = response.securityInfo(); 1646 params.security_info = response.securityInfo();
(...skipping 4032 matching lines...) Expand 10 before | Expand all | Expand 10 after
5677 } 5679 }
5678 } 5680 }
5679 5681
5680 void RenderView::OnContextMenuClosed( 5682 void RenderView::OnContextMenuClosed(
5681 const webkit_glue::CustomContextMenuContext& custom_context) { 5683 const webkit_glue::CustomContextMenuContext& custom_context) {
5682 if (custom_context.is_pepper_menu) 5684 if (custom_context.is_pepper_menu)
5683 pepper_delegate_.OnContextMenuClosed(custom_context); 5685 pepper_delegate_.OnContextMenuClosed(custom_context);
5684 else 5686 else
5685 context_menu_node_.reset(); 5687 context_menu_node_.reset();
5686 } 5688 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698