Remove "parent_frame_id" property

Remove the property from
 - content::ResourceRequest
 - content::RequestExtraData.

It is not used.

Bug: 770624
Change-Id: Ibc5c6b2025a1c141b9a6ee07c7e3fcb3d2b9cfc2
Reviewed-on: https://chromium-review.googlesource.com/694703
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505939}
diff --git a/content/browser/download/download_utils.cc b/content/browser/download/download_utils.cc
index b19862ac..6ecdb911 100644
--- a/content/browser/download/download_utils.cc
+++ b/content/browser/download/download_utils.cc
@@ -178,12 +178,7 @@
     RenderFrameHost* render_frame_host =
         RenderFrameHost::FromID(params->render_process_host_id(),
                                 params->render_frame_host_routing_id());
-    RenderFrameHost* parent_frame = render_frame_host->GetParent();
-    if (parent_frame) {
-      request->parent_render_frame_id = parent_frame->GetRoutingID();
-    } else {
-      request->is_main_frame = true;
-    }
+    request->is_main_frame = !render_frame_host->GetParent();
 
     request->render_frame_id = params->render_frame_host_routing_id();
   }
diff --git a/content/browser/security_exploit_browsertest.cc b/content/browser/security_exploit_browsertest.cc
index 2d6ccd34..b2616a67 100644
--- a/content/browser/security_exploit_browsertest.cc
+++ b/content/browser/security_exploit_browsertest.cc
@@ -131,7 +131,6 @@
   request.download_to_file = false;
   request.should_reset_appcache = false;
   request.is_main_frame = true;
-  request.parent_render_frame_id = -1;
   request.transition_type = ui::PAGE_TRANSITION_LINK;
   request.allow_download = true;
   return request;
diff --git a/content/child/request_extra_data.cc b/content/child/request_extra_data.cc
index 3e5f2d76..1d400ac 100644
--- a/content/child/request_extra_data.cc
+++ b/content/child/request_extra_data.cc
@@ -17,7 +17,6 @@
     : visibility_state_(blink::kWebPageVisibilityStateVisible),
       render_frame_id_(MSG_ROUTING_NONE),
       is_main_frame_(false),
-      parent_render_frame_id_(-1),
       allow_download_(true),
       transition_type_(ui::PAGE_TRANSITION_LINK),
       should_replace_current_entry_(false),
@@ -39,7 +38,6 @@
   request->render_frame_id = render_frame_id_;
   request->is_main_frame = is_main_frame_;
 
-  request->parent_render_frame_id = parent_render_frame_id_;
   request->allow_download = allow_download_;
   request->transition_type = transition_type_;
   request->should_replace_current_entry = should_replace_current_entry_;
diff --git a/content/child/request_extra_data.h b/content/child/request_extra_data.h
index f3c4c59..2240a465 100644
--- a/content/child/request_extra_data.h
+++ b/content/child/request_extra_data.h
@@ -44,9 +44,6 @@
   void set_frame_origin(const url::Origin& frame_origin) {
     frame_origin_ = frame_origin;
   }
-  void set_parent_render_frame_id(int parent_render_frame_id) {
-    parent_render_frame_id_ = parent_render_frame_id;
-  }
   void set_allow_download(bool allow_download) {
     allow_download_ = allow_download;
   }
@@ -153,7 +150,6 @@
   int render_frame_id_;
   bool is_main_frame_;
   url::Origin frame_origin_;
-  int parent_render_frame_id_;
   bool allow_download_;
   ui::PageTransition transition_type_;
   bool should_replace_current_entry_;
diff --git a/content/common/resource_messages.h b/content/common/resource_messages.h
index 2a83259..5686e4eff 100644
--- a/content/common/resource_messages.h
+++ b/content/common/resource_messages.h
@@ -275,7 +275,6 @@
   IPC_STRUCT_TRAITS_MEMBER(do_not_prompt_for_login)
   IPC_STRUCT_TRAITS_MEMBER(render_frame_id)
   IPC_STRUCT_TRAITS_MEMBER(is_main_frame)
-  IPC_STRUCT_TRAITS_MEMBER(parent_render_frame_id)
   IPC_STRUCT_TRAITS_MEMBER(transition_type)
   IPC_STRUCT_TRAITS_MEMBER(should_replace_current_entry)
   IPC_STRUCT_TRAITS_MEMBER(transferred_request_child_id)
diff --git a/content/public/common/resource_request.h b/content/public/common/resource_request.h
index c4555d7d9..c4e27d68 100644
--- a/content/public/common/resource_request.h
+++ b/content/public/common/resource_request.h
@@ -156,10 +156,6 @@
   // True if |frame_id| is the main frame of a RenderView.
   bool is_main_frame = false;
 
-  // Identifies the parent frame of the frame that sent the request.
-  // -1 if unknown / invalid.
-  int parent_render_frame_id = -1;
-
   ui::PageTransition transition_type = ui::PAGE_TRANSITION_LINK;
 
   // For navigations, whether this navigation should replace the current session
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 28aa6f23..318aca4 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4411,8 +4411,6 @@
       document_loader->ReplacesCurrentHistoryItem();
 
   WebFrame* parent = frame_->Parent();
-  int parent_routing_id =
-      parent ? RenderFrame::GetRoutingIdForWebFrame(parent) : -1;
 
   WebDocument frame_document = frame_->GetDocument();
   RequestExtraData* extra_data =
@@ -4425,7 +4423,6 @@
   extra_data->set_render_frame_id(routing_id_);
   extra_data->set_is_main_frame(!parent);
   extra_data->set_frame_origin(url::Origin(frame_document.GetSecurityOrigin()));
-  extra_data->set_parent_render_frame_id(parent_routing_id);
   extra_data->set_allow_download(
       navigation_state->common_params().allow_download);
   extra_data->set_transition_type(transition_type);