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

Unified Diff: chrome/browser/automation/url_request_mock_http_job.cc

Issue 40138: Use FilterContext to allow filters to access URLRequestJob data... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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/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);
}

Powered by Google App Engine
This is Rietveld 408576698