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

Unified Diff: android_webview/browser/net/android_stream_reader_url_request_job.h

Issue 12531002: [android_webview] Make intercepted URLRequests have status codes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit test Created 7 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
« no previous file with comments | « no previous file | android_webview/browser/net/android_stream_reader_url_request_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/net/android_stream_reader_url_request_job.h
diff --git a/android_webview/browser/net/android_stream_reader_url_request_job.h b/android_webview/browser/net/android_stream_reader_url_request_job.h
index 0cb0bd3653f1738525546891f91e594500c89006..c516b760f3d931a1be55e9b441d55fa8fc796418 100644
--- a/android_webview/browser/net/android_stream_reader_url_request_job.h
+++ b/android_webview/browser/net/android_stream_reader_url_request_job.h
@@ -5,6 +5,8 @@
#ifndef ANDROID_WEBVIEW_NATIVE_ANDROID_STREAM_READER_URL_REQUEST_JOB_H_
#define ANDROID_WEBVIEW_NATIVE_ANDROID_STREAM_READER_URL_REQUEST_JOB_H_
+#include <string>
+
#include "base/android/scoped_java_ref.h"
#include "base/location.h"
#include "base/memory/ref_counted.h"
@@ -24,6 +26,7 @@ class TaskRunner;
}
namespace net {
+class HttpResponseInfo;
class URLRequest;
}
@@ -81,6 +84,8 @@ class AndroidStreamReaderURLRequestJob : public net::URLRequestJob {
const net::HttpRequestHeaders& headers) OVERRIDE;
virtual bool GetMimeType(std::string* mime_type) const OVERRIDE;
virtual bool GetCharset(std::string* charset) OVERRIDE;
+ virtual int GetResponseCode() const OVERRIDE;
+ virtual void GetResponseInfo(net::HttpResponseInfo* info) OVERRIDE;
protected:
virtual ~AndroidStreamReaderURLRequestJob();
@@ -95,6 +100,8 @@ class AndroidStreamReaderURLRequestJob : public net::URLRequestJob {
CreateStreamReader(android_webview::InputStream* stream);
private:
+ void HeadersComplete(int status_code, const std::string& status_text);
+
void OnInputStreamOpened(
scoped_ptr<Delegate> delegate,
scoped_ptr<android_webview::InputStream> input_stream);
@@ -102,6 +109,7 @@ class AndroidStreamReaderURLRequestJob : public net::URLRequestJob {
void OnReaderReadCompleted(int bytes_read);
net::HttpByteRange byte_range_;
+ scoped_ptr<net::HttpResponseInfo> response_info_;
scoped_ptr<Delegate> delegate_;
scoped_refptr<InputStreamReaderWrapper> input_stream_reader_wrapper_;
base::WeakPtrFactory<AndroidStreamReaderURLRequestJob> weak_factory_;
« no previous file with comments | « no previous file | android_webview/browser/net/android_stream_reader_url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698