Index: chrome/browser/google_apis/test_util.cc |
diff --git a/chrome/browser/google_apis/test_util.cc b/chrome/browser/google_apis/test_util.cc |
index f7e5a828b5dac44e39520c7ea3797826759de3bf..ef91aecc948484ddf75ade8d32dd08a1cc839173 100644 |
--- a/chrome/browser/google_apis/test_util.cc |
+++ b/chrome/browser/google_apis/test_util.cc |
@@ -126,11 +126,11 @@ scoped_ptr<base::Value> LoadJSONFile(const std::string& relative_path) { |
} |
// Returns a HttpResponse created from the given file path. |
-scoped_ptr<net::test_server::HttpResponse> CreateHttpResponseFromFile( |
+scoped_ptr<net::test_server::BasicHttpResponse> CreateHttpResponseFromFile( |
const base::FilePath& file_path) { |
std::string content; |
if (!file_util::ReadFileToString(file_path, &content)) |
- return scoped_ptr<net::test_server::HttpResponse>(); |
+ return scoped_ptr<net::test_server::BasicHttpResponse>(); |
std::string content_type = "text/plain"; |
if (EndsWith(file_path.AsUTF8Unsafe(), ".json", true /* case sensitive */)) { |
@@ -139,8 +139,8 @@ scoped_ptr<net::test_server::HttpResponse> CreateHttpResponseFromFile( |
content_type = "application/atom+xml"; |
} |
- scoped_ptr<net::test_server::HttpResponse> http_response( |
- new net::test_server::HttpResponse); |
+ scoped_ptr<net::test_server::BasicHttpResponse> http_response( |
+ new net::test_server::BasicHttpResponse); |
http_response->set_code(net::test_server::SUCCESS); |
http_response->set_content(content); |
http_response->set_content_type(content_type); |
@@ -157,7 +157,8 @@ scoped_ptr<net::test_server::HttpResponse> HandleDownloadRequest( |
std::string remaining_path; |
if (!RemovePrefix(absolute_url.path(), "/files/", &remaining_path)) |
return scoped_ptr<net::test_server::HttpResponse>(); |
- return CreateHttpResponseFromFile(GetTestFilePath(remaining_path)); |
+ return CreateHttpResponseFromFile( |
+ GetTestFilePath(remaining_path)).PassAs<net::test_server::HttpResponse>(); |
} |
bool VerifyJsonData(const base::FilePath& expected_json_file_path, |