OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/net/view_http_cache_job_factory.h" | 5 #include "chrome/browser/net/view_http_cache_job_factory.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/string_util.h" |
8 #include "chrome/common/url_constants.h" | 9 #include "chrome/common/url_constants.h" |
9 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
10 #include "net/url_request/url_request.h" | 11 #include "net/url_request/url_request.h" |
11 #include "net/url_request/url_request_context.h" | 12 #include "net/url_request/url_request_context.h" |
12 #include "net/url_request/url_request_simple_job.h" | 13 #include "net/url_request/url_request_simple_job.h" |
13 #include "net/url_request/view_cache_helper.h" | 14 #include "net/url_request/view_cache_helper.h" |
14 | 15 |
15 namespace { | 16 namespace { |
16 | 17 |
17 // A job subclass that dumps an HTTP cache entry. | 18 // A job subclass that dumps an HTTP cache entry. |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 bool ViewHttpCacheJobFactory::IsSupportedURL(const GURL& url) { | 100 bool ViewHttpCacheJobFactory::IsSupportedURL(const GURL& url) { |
100 return StartsWithASCII(url.spec(), chrome::kNetworkViewCacheURL, | 101 return StartsWithASCII(url.spec(), chrome::kNetworkViewCacheURL, |
101 true /*case_sensitive*/); | 102 true /*case_sensitive*/); |
102 } | 103 } |
103 | 104 |
104 // Static. | 105 // Static. |
105 URLRequestJob* ViewHttpCacheJobFactory::CreateJobForRequest( | 106 URLRequestJob* ViewHttpCacheJobFactory::CreateJobForRequest( |
106 URLRequest* request) { | 107 URLRequest* request) { |
107 return new ViewHttpCacheJob(request); | 108 return new ViewHttpCacheJob(request); |
108 } | 109 } |
OLD | NEW |