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 WEBKIT_BROWSER_APPCACHE_APPCACHE_RESPONSE_H_ | 5 #ifndef WEBKIT_BROWSER_APPCACHE_APPCACHE_RESPONSE_H_ |
6 #define WEBKIT_BROWSER_APPCACHE_APPCACHE_RESPONSE_H_ | 6 #define WEBKIT_BROWSER_APPCACHE_APPCACHE_RESPONSE_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 // Response info for a particular response id. Instances are tracked in | 28 // Response info for a particular response id. Instances are tracked in |
29 // the working set. | 29 // the working set. |
30 class WEBKIT_STORAGE_BROWSER_EXPORT AppCacheResponseInfo | 30 class WEBKIT_STORAGE_BROWSER_EXPORT AppCacheResponseInfo |
31 : public base::RefCounted<AppCacheResponseInfo> { | 31 : public base::RefCounted<AppCacheResponseInfo> { |
32 public: | 32 public: |
33 // AppCacheResponseInfo takes ownership of the http_info. | 33 // AppCacheResponseInfo takes ownership of the http_info. |
34 AppCacheResponseInfo(AppCacheService* service, const GURL& manifest_url, | 34 AppCacheResponseInfo(AppCacheService* service, const GURL& manifest_url, |
35 int64 response_id, net::HttpResponseInfo* http_info, | 35 int64 response_id, net::HttpResponseInfo* http_info, |
36 int64 response_data_size); | 36 int64 response_data_size); |
37 | 37 |
| 38 // Constructor for synthesized response headers that are not stored. |
| 39 AppCacheResponseInfo( |
| 40 const GURL& manifest_url, |
| 41 net::HttpResponseInfo* http_info, |
| 42 int64 response_data_size); |
| 43 |
38 const GURL& manifest_url() const { return manifest_url_; } | 44 const GURL& manifest_url() const { return manifest_url_; } |
39 int64 response_id() const { return response_id_; } | 45 int64 response_id() const { return response_id_; } |
40 const net::HttpResponseInfo* http_response_info() const { | 46 const net::HttpResponseInfo* http_response_info() const { |
41 return http_response_info_.get(); | 47 return http_response_info_.get(); |
42 } | 48 } |
43 int64 response_data_size() const { return response_data_size_; } | 49 int64 response_data_size() const { return response_data_size_; } |
44 | 50 |
45 private: | 51 private: |
46 friend class base::RefCounted<AppCacheResponseInfo>; | 52 friend class base::RefCounted<AppCacheResponseInfo>; |
47 virtual ~AppCacheResponseInfo(); | 53 virtual ~AppCacheResponseInfo(); |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 int write_position_; | 258 int write_position_; |
253 int write_amount_; | 259 int write_amount_; |
254 CreationPhase creation_phase_; | 260 CreationPhase creation_phase_; |
255 net::CompletionCallback create_callback_; | 261 net::CompletionCallback create_callback_; |
256 base::WeakPtrFactory<AppCacheResponseWriter> weak_factory_; | 262 base::WeakPtrFactory<AppCacheResponseWriter> weak_factory_; |
257 }; | 263 }; |
258 | 264 |
259 } // namespace appcache | 265 } // namespace appcache |
260 | 266 |
261 #endif // WEBKIT_BROWSER_APPCACHE_APPCACHE_RESPONSE_H_ | 267 #endif // WEBKIT_BROWSER_APPCACHE_APPCACHE_RESPONSE_H_ |
OLD | NEW |