Commit b2019261 authored by Karan Bhatia's avatar Karan Bhatia Committed by Commit Bot

WebRequest: Remove redundant render_frame_id_ from WebRequestEventDetails.

It's not used anymore.

BUG=None

Change-Id: I62d5b22b61ed08e7a6be8fac730506137b5b5b28
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1992502
Auto-Submit: Karan Bhatia <karandeepb@chromium.org>
Commit-Queue: Kelvin Jiang <kelvinjiang@chromium.org>
Reviewed-by: default avatarKelvin Jiang <kelvinjiang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#729573}
parent 67d9a620
......@@ -27,7 +27,6 @@ TEST(WebRequestEventDetailsTest, WhitelistedCopyForPublicSession) {
};
orig->render_process_id_ = 1;
orig->render_frame_id_ = 2;
orig->extra_info_spec_ = 3;
orig->request_body_.reset(new base::DictionaryValue);
......@@ -49,7 +48,6 @@ TEST(WebRequestEventDetailsTest, WhitelistedCopyForPublicSession) {
orig->CreatePublicSessionCopy();
EXPECT_EQ(orig->render_process_id_, copy->render_process_id_);
EXPECT_EQ(orig->render_frame_id_, copy->render_frame_id_);
EXPECT_EQ(0, copy->extra_info_spec_);
EXPECT_EQ(nullptr, copy->request_body_);
......
......@@ -23,7 +23,6 @@
#include "extensions/browser/api/web_request/web_request_permissions.h"
#include "extensions/browser/api/web_request/web_request_resource_type.h"
#include "extensions/common/permissions/permissions_data.h"
#include "ipc/ipc_message.h"
#include "net/base/auth.h"
#include "net/base/upload_data_stream.h"
#include "net/http/http_request_headers.h"
......@@ -51,8 +50,7 @@ void EraseHeadersIf(
WebRequestEventDetails::WebRequestEventDetails(const WebRequestInfo& request,
int extra_info_spec)
: extra_info_spec_(extra_info_spec),
render_process_id_(content::ChildProcessHost::kInvalidUniqueID),
render_frame_id_(MSG_ROUTING_NONE) {
render_process_id_(content::ChildProcessHost::kInvalidUniqueID) {
dict_.SetString(keys::kMethodKey, request.method);
dict_.SetString(keys::kRequestIdKey, base::NumberToString(request.id));
dict_.SetDouble(keys::kTimeStampKey, base::Time::Now().ToDoubleT() * 1000);
......@@ -64,7 +62,6 @@ WebRequestEventDetails::WebRequestEventDetails(const WebRequestInfo& request,
dict_.SetInteger(keys::kParentFrameIdKey, request.frame_data.parent_frame_id);
initiator_ = request.initiator;
render_process_id_ = request.render_process_id;
render_frame_id_ = request.frame_id;
}
WebRequestEventDetails::~WebRequestEventDetails() = default;
......@@ -191,7 +188,6 @@ WebRequestEventDetails::CreatePublicSessionCopy() {
std::unique_ptr<WebRequestEventDetails> copy(new WebRequestEventDetails);
copy->initiator_ = initiator_;
copy->render_process_id_ = render_process_id_;
copy->render_frame_id_ = render_frame_id_;
static const char* const kSafeAttributes[] = {
"method", "requestId", "timeStamp", "type", "tabId", "frameId",
......@@ -214,6 +210,6 @@ WebRequestEventDetails::CreatePublicSessionCopy() {
}
WebRequestEventDetails::WebRequestEventDetails()
: extra_info_spec_(0), render_process_id_(0), render_frame_id_(0) {}
: extra_info_spec_(0), render_process_id_(0) {}
} // namespace extensions
......@@ -131,9 +131,7 @@ class WebRequestEventDetails {
int extra_info_spec_;
// Used to determine the tabId, frameId and parentFrameId.
int render_process_id_;
int render_frame_id_;
DISALLOW_COPY_AND_ASSIGN(WebRequestEventDetails);
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment