Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(614)

Side by Side Diff: content/browser/net/view_http_cache_job_factory.cc

Issue 11343013: Move content\browser\net to content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "content/public/common/url_constants.h" 14 #include "content/public/common/url_constants.h"
15 #include "net/base/completion_callback.h" 15 #include "net/base/completion_callback.h"
16 #include "net/base/net_errors.h" 16 #include "net/base/net_errors.h"
17 #include "net/url_request/url_request.h" 17 #include "net/url_request/url_request.h"
18 #include "net/url_request/url_request_simple_job.h" 18 #include "net/url_request/url_request_simple_job.h"
19 #include "net/url_request/view_cache_helper.h" 19 #include "net/url_request/view_cache_helper.h"
20 20
21 namespace content {
21 namespace { 22 namespace {
22 23
23 // A job subclass that dumps an HTTP cache entry. 24 // A job subclass that dumps an HTTP cache entry.
24 class ViewHttpCacheJob : public net::URLRequestJob { 25 class ViewHttpCacheJob : public net::URLRequestJob {
25 public: 26 public:
26 ViewHttpCacheJob(net::URLRequest* request, 27 ViewHttpCacheJob(net::URLRequest* request,
27 net::NetworkDelegate* network_delegate) 28 net::NetworkDelegate* network_delegate)
28 : net::URLRequestJob(request, network_delegate), 29 : net::URLRequestJob(request, network_delegate),
29 core_(new Core), 30 core_(new Core),
30 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)), 31 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)),
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 bool ViewHttpCacheJobFactory::IsSupportedURL(const GURL& url) { 194 bool ViewHttpCacheJobFactory::IsSupportedURL(const GURL& url) {
194 return url.SchemeIs(chrome::kChromeUIScheme) && 195 return url.SchemeIs(chrome::kChromeUIScheme) &&
195 url.host() == chrome::kChromeUINetworkViewCacheHost; 196 url.host() == chrome::kChromeUINetworkViewCacheHost;
196 } 197 }
197 198
198 // Static. 199 // Static.
199 net::URLRequestJob* ViewHttpCacheJobFactory::CreateJobForRequest( 200 net::URLRequestJob* ViewHttpCacheJobFactory::CreateJobForRequest(
200 net::URLRequest* request, net::NetworkDelegate* network_delegate) { 201 net::URLRequest* request, net::NetworkDelegate* network_delegate) {
201 return new ViewHttpCacheJob(request, network_delegate); 202 return new ViewHttpCacheJob(request, network_delegate);
202 } 203 }
204
205 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698