Apply NIK to reporting and NEL, part 3.

Add NIK parameter to ReportingService::QueueReport().

Bug: 993805
TBR: [email protected]
Change-Id: Ie3181f2a1ae43e0dd7c38833a3d364d63ef8ce3f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2485392
Reviewed-by: Martin Šrámek <[email protected]>
Reviewed-by: Lily Chen <[email protected]>
Commit-Queue: Matt Menke <[email protected]>
Cr-Commit-Position: refs/heads/master@{#819692}
diff --git a/net/reporting/reporting_test_util.cc b/net/reporting/reporting_test_util.cc
index fc3b015..8c850e70 100644
--- a/net/reporting/reporting_test_util.cc
+++ b/net/reporting/reporting_test_util.cc
@@ -299,13 +299,16 @@
       body(std::move(other.body)),
       depth(other.depth) {}
 
-TestReportingService::Report::Report(const GURL& url,
-                                     const std::string& user_agent,
-                                     const std::string& group,
-                                     const std::string& type,
-                                     std::unique_ptr<const base::Value> body,
-                                     int depth)
+TestReportingService::Report::Report(
+    const GURL& url,
+    const NetworkIsolationKey& network_isolation_key,
+    const std::string& user_agent,
+    const std::string& group,
+    const std::string& type,
+    std::unique_ptr<const base::Value> body,
+    int depth)
     : url(url),
+      network_isolation_key(network_isolation_key),
       user_agent(user_agent),
       group(group),
       type(type),
@@ -318,14 +321,16 @@
 
 TestReportingService::~TestReportingService() = default;
 
-void TestReportingService::QueueReport(const GURL& url,
-                                       const std::string& user_agent,
-                                       const std::string& group,
-                                       const std::string& type,
-                                       std::unique_ptr<const base::Value> body,
-                                       int depth) {
-  reports_.push_back(
-      Report(url, user_agent, group, type, std::move(body), depth));
+void TestReportingService::QueueReport(
+    const GURL& url,
+    const NetworkIsolationKey& network_isolation_key,
+    const std::string& user_agent,
+    const std::string& group,
+    const std::string& type,
+    std::unique_ptr<const base::Value> body,
+    int depth) {
+  reports_.emplace_back(Report(url, network_isolation_key, user_agent, group,
+                               type, std::move(body), depth));
 }
 
 void TestReportingService::ProcessHeader(const GURL& url,