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 #include "content/browser/net/view_http_cache_job_factory.h" | 5 #include "content/browser/net/view_http_cache_job_factory.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 | 183 |
184 // We may be holding the last reference to this job. Do not access |this| | 184 // We may be holding the last reference to this job. Do not access |this| |
185 // after Release(). | 185 // after Release(). |
186 Release(); // Acquired on Start(). | 186 Release(); // Acquired on Start(). |
187 } | 187 } |
188 | 188 |
189 } // namespace. | 189 } // namespace. |
190 | 190 |
191 // Static. | 191 // Static. |
192 bool ViewHttpCacheJobFactory::IsSupportedURL(const GURL& url) { | 192 bool ViewHttpCacheJobFactory::IsSupportedURL(const GURL& url) { |
193 return url.SchemeIs(chrome::kChromeUIScheme) && | 193 return url.SchemeIs(kChromeUIScheme) && |
194 url.host() == kChromeUINetworkViewCacheHost; | 194 url.host() == kChromeUINetworkViewCacheHost; |
195 } | 195 } |
196 | 196 |
197 // Static. | 197 // Static. |
198 net::URLRequestJob* ViewHttpCacheJobFactory::CreateJobForRequest( | 198 net::URLRequestJob* ViewHttpCacheJobFactory::CreateJobForRequest( |
199 net::URLRequest* request, net::NetworkDelegate* network_delegate) { | 199 net::URLRequest* request, net::NetworkDelegate* network_delegate) { |
200 return new ViewHttpCacheJob(request, network_delegate); | 200 return new ViewHttpCacheJob(request, network_delegate); |
201 } | 201 } |
202 | 202 |
203 } // namespace content | 203 } // namespace content |
OLD | NEW |