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

Unified Diff: chrome/browser/automation/url_request_slow_download_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_slow_download_job.cc
===================================================================
--- chrome/browser/automation/url_request_slow_download_job.cc (revision 11030)
+++ chrome/browser/automation/url_request_slow_download_job.cc (working copy)
@@ -131,7 +131,14 @@
}
}
+// Public virtual version.
void URLRequestSlowDownloadJob::GetResponseInfo(net::HttpResponseInfo* info) {
+ // Forward to private const version.
+ GetResponseInfoConst(info);
+}
+
+// Private const version.
+void URLRequestSlowDownloadJob::GetResponseInfoConst(net::HttpResponseInfo* info) const {
huanr 2009/03/09 17:50:44 80 characters.
jar (doing other things) 2009/03/09 19:00:41 Done.
// Send back mock headers.
std::string raw_headers;
if (LowerCaseEqualsASCII(kFinishDownloadUrl,
@@ -156,9 +163,9 @@
info->headers = new net::HttpResponseHeaders(raw_headers);
}
-bool URLRequestSlowDownloadJob::GetMimeType(std::string* mime_type) {
+bool URLRequestSlowDownloadJob::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