| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_URL_REQUEST_JOB_H_ | 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_URL_REQUEST_JOB_H_ |
| 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_URL_REQUEST_JOB_H_ | 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_URL_REQUEST_JOB_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 void SetupRangeResponse(); | 141 void SetupRangeResponse(); |
| 142 | 142 |
| 143 // AppCacheResponseReader completion callback | 143 // AppCacheResponseReader completion callback |
| 144 void OnReadComplete(int result); | 144 void OnReadComplete(int result); |
| 145 | 145 |
| 146 // net::URLRequestJob methods, see url_request_job.h for doc comments | 146 // net::URLRequestJob methods, see url_request_job.h for doc comments |
| 147 void Start() override; | 147 void Start() override; |
| 148 net::LoadState GetLoadState() const override; | 148 net::LoadState GetLoadState() const override; |
| 149 bool GetCharset(std::string* charset) override; | 149 bool GetCharset(std::string* charset) override; |
| 150 void GetResponseInfo(net::HttpResponseInfo* info) override; | 150 void GetResponseInfo(net::HttpResponseInfo* info) override; |
| 151 bool ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read) override; | 151 int ReadRawData(net::IOBuffer* buf, int buf_size) override; |
| 152 | 152 |
| 153 // Sets extra request headers for Job types that support request headers. | 153 // Sets extra request headers for Job types that support request headers. |
| 154 // This is how we get informed of range-requests. | 154 // This is how we get informed of range-requests. |
| 155 void SetExtraRequestHeaders(const net::HttpRequestHeaders& headers) override; | 155 void SetExtraRequestHeaders(const net::HttpRequestHeaders& headers) override; |
| 156 | 156 |
| 157 // FilterContext methods | 157 // FilterContext methods |
| 158 bool GetMimeType(std::string* mime_type) const override; | 158 bool GetMimeType(std::string* mime_type) const override; |
| 159 int GetResponseCode() const override; | 159 int GetResponseCode() const override; |
| 160 | 160 |
| 161 // Invokes |prepare_to_restart_callback_| and then calls | 161 // Invokes |prepare_to_restart_callback_| and then calls |
| (...skipping 21 matching lines...) Expand all Loading... |
| 183 scoped_ptr<AppCacheResponseReader> reader_; | 183 scoped_ptr<AppCacheResponseReader> reader_; |
| 184 scoped_refptr<AppCache> cache_; | 184 scoped_refptr<AppCache> cache_; |
| 185 scoped_refptr<AppCacheGroup> group_; | 185 scoped_refptr<AppCacheGroup> group_; |
| 186 const OnPrepareToRestartCallback on_prepare_to_restart_callback_; | 186 const OnPrepareToRestartCallback on_prepare_to_restart_callback_; |
| 187 base::WeakPtrFactory<AppCacheURLRequestJob> weak_factory_; | 187 base::WeakPtrFactory<AppCacheURLRequestJob> weak_factory_; |
| 188 }; | 188 }; |
| 189 | 189 |
| 190 } // namespace content | 190 } // namespace content |
| 191 | 191 |
| 192 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_URL_REQUEST_JOB_H_ | 192 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_URL_REQUEST_JOB_H_ |
| OLD | NEW |