OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 NET_URL_REQUEST_URL_REQUEST_VIEW_CACHE_JOB_H__ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_VIEW_CACHE_JOB_H_ |
6 #define NET_URL_REQUEST_URL_REQUEST_VIEW_CACHE_JOB_H__ | 6 #define NET_URL_REQUEST_URL_REQUEST_VIEW_CACHE_JOB_H_ |
7 | 7 |
| 8 #include "net/url_request/url_request.h" |
8 #include "net/url_request/url_request_simple_job.h" | 9 #include "net/url_request/url_request_simple_job.h" |
9 | 10 |
10 namespace disk_cache { | 11 namespace disk_cache { |
11 class Backend; | 12 class Backend; |
12 } | 13 } |
13 | 14 |
14 // A job subclass that implements the view-cache: protocol, which simply | 15 // A job subclass that implements the view-cache: protocol, which simply |
15 // provides a debug view of the cache or of a particular cache entry. | 16 // provides a debug view of the cache or of a particular cache entry. |
16 class URLRequestViewCacheJob : public URLRequestSimpleJob { | 17 class URLRequestViewCacheJob : public URLRequestSimpleJob { |
17 public: | 18 public: |
18 URLRequestViewCacheJob(URLRequest* request) : URLRequestSimpleJob(request) {} | 19 URLRequestViewCacheJob(URLRequest* request) : URLRequestSimpleJob(request) {} |
19 | 20 |
20 static URLRequest::ProtocolFactory Factory; | 21 static URLRequest::ProtocolFactory Factory; |
21 | 22 |
22 // override from URLRequestSimpleJob | 23 // override from URLRequestSimpleJob |
23 virtual bool GetData(std::string* mime_type, | 24 virtual bool GetData(std::string* mime_type, |
24 std::string* charset, | 25 std::string* charset, |
25 std::string* data) const; | 26 std::string* data) const; |
26 | 27 |
27 private: | 28 private: |
28 disk_cache::Backend* GetDiskCache() const; | 29 disk_cache::Backend* GetDiskCache() const; |
29 }; | 30 }; |
30 | 31 |
31 #endif // NET_URL_REQUEST_URL_REQUEST_VIEW_CACHE_JOB_H__ | 32 #endif // NET_URL_REQUEST_URL_REQUEST_VIEW_CACHE_JOB_H_ |
32 | |
OLD | NEW |