Chromium Code Reviews| Index: chrome/browser/automation/url_request_mock_http_job.cc |
| =================================================================== |
| --- chrome/browser/automation/url_request_mock_http_job.cc (revision 11030) |
| +++ chrome/browser/automation/url_request_mock_http_job.cc (working copy) |
| @@ -61,7 +61,14 @@ |
| const FilePath& file_path) |
| : URLRequestFileJob(request, file_path) { } |
| +// Public virtual version. |
| void URLRequestMockHTTPJob::GetResponseInfo(net::HttpResponseInfo* info) { |
| + // Forward to private const version. |
| + GetResponseInfoConst(info); |
| +} |
| + |
| +// Private const version. |
| +void URLRequestMockHTTPJob::GetResponseInfoConst(net::HttpResponseInfo* info) const { |
|
huanr
2009/03/09 17:50:44
this line exceeds 80 characters. same for some oth
jar (doing other things)
2009/03/09 19:00:41
Done.
|
| std::wstring header_file = file_path_.ToWStringHack() + kMockHeaderFileSuffix; |
| std::string raw_headers; |
| if (!file_util::ReadFileToString(header_file, &raw_headers)) |
| @@ -72,9 +79,9 @@ |
| info->headers = new net::HttpResponseHeaders(raw_headers); |
| } |
| -bool URLRequestMockHTTPJob::GetMimeType(std::string* mime_type) { |
| +bool URLRequestMockHTTPJob::GetMimeType(std::string* mime_type) const { |
| net::HttpResponseInfo info; |
| - GetResponseInfo(&info); |
| + GetResponseInfoConst(&info); |
| return info.headers && info.headers->GetMimeType(mime_type); |
| } |