| Index: components/update_client/url_request_post_interceptor.cc
|
| diff --git a/components/update_client/url_request_post_interceptor.cc b/components/update_client/url_request_post_interceptor.cc
|
| index 3850160612036dd51a96f82183d98c70af866b63..9753cb9fa99905baa4555614abfd0aac3ff1e95b 100644
|
| --- a/components/update_client/url_request_post_interceptor.cc
|
| +++ b/components/update_client/url_request_post_interceptor.cc
|
| @@ -8,10 +8,13 @@
|
|
|
| #include "base/files/file_util.h"
|
| #include "base/macros.h"
|
| +#include "base/memory/ref_counted.h"
|
| #include "base/strings/stringprintf.h"
|
| #include "components/update_client/test_configurator.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/http/http_util.h"
|
| #include "net/url_request/url_request.h"
|
| #include "net/url_request/url_request_filter.h"
|
| #include "net/url_request/url_request_interceptor.h"
|
| @@ -32,7 +35,12 @@ class URLRequestMockJob : public net::URLRequestSimpleJob {
|
| response_body_(response_body) {}
|
|
|
| protected:
|
| - int GetResponseCode() const override { return response_code_; }
|
| + void GetResponseInfo(net::HttpResponseInfo* info) override {
|
| + const std::string headers =
|
| + base::StringPrintf("HTTP/1.1 %i OK\r\n\r\n", response_code_);
|
| + info->headers = base::MakeShared<net::HttpResponseHeaders>(
|
| + net::HttpUtil::AssembleRawHeaders(headers.c_str(), headers.length()));
|
| + }
|
|
|
| int GetData(std::string* mime_type,
|
| std::string* charset,
|
|
|