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

Unified Diff: chrome/browser/safe_browsing/certificate_reporting_service_test_utils.cc

Issue 2648713002: Add response code to the success callback of ReportSender (Closed)
Patch Set: eroman and estark comments Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/safe_browsing/certificate_reporting_service_test_utils.cc
diff --git a/chrome/browser/safe_browsing/certificate_reporting_service_test_utils.cc b/chrome/browser/safe_browsing/certificate_reporting_service_test_utils.cc
index c5e9ceacfd18a6c047f8172055512cce506ce320..f3c9d4c81f42d958541279ff02823d3c0c1454ca 100644
--- a/chrome/browser/safe_browsing/certificate_reporting_service_test_utils.cc
+++ b/chrome/browser/safe_browsing/certificate_reporting_service_test_utils.cc
@@ -11,6 +11,7 @@
#include "content/public/test/test_utils.h"
#include "net/base/upload_bytes_element_reader.h"
#include "net/base/upload_data_stream.h"
+#include "net/http/http_response_headers.h"
#include "net/url_request/url_request_filter.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/boringssl/src/include/openssl/curve25519.h"
@@ -189,6 +190,9 @@ int DelayableCertReportURLRequestJob::ReadRawData(net::IOBuffer* buf,
void DelayableCertReportURLRequestJob::GetResponseInfo(
net::HttpResponseInfo* info) {
// Report sender ignores responses. Return empty response.
+ if (!should_fail_) {
+ info->headers = new net::HttpResponseHeaders("HTTP/1.1 200 OK");
+ }
}
void DelayableCertReportURLRequestJob::Resume() {

Powered by Google App Engine
This is Rietveld 408576698