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

Side by Side Diff: net/url_request/url_request_about_job.cc

Issue 10534100: Decouple URLRequestJob from URLRequestContext; access NetworkDelegate as a contructor parameter. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merged with latest sync Created 8 years, 5 months 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
« no previous file with comments | « net/url_request/url_request.cc ('k') | net/url_request/url_request_error_job.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Simple implementation of about: protocol handler that treats everything as 5 // Simple implementation of about: protocol handler that treats everything as
6 // about:blank. No other about: features should be available to web content, 6 // about:blank. No other about: features should be available to web content,
7 // so they're not implemented here. 7 // so they're not implemented here.
8 8
9 #include "net/url_request/url_request_about_job.h" 9 #include "net/url_request/url_request_about_job.h"
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/message_loop.h" 13 #include "base/message_loop.h"
14 #include "net/url_request/url_request.h"
15 #include "net/url_request/url_request_context.h"
14 16
15 namespace net { 17 namespace net {
16 18
17 URLRequestAboutJob::URLRequestAboutJob(URLRequest* request) 19 URLRequestAboutJob::URLRequestAboutJob(URLRequest* request)
18 : URLRequestJob(request), 20 : URLRequestJob(request, request->context()->network_delegate()),
19 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { 21 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
20 } 22 }
21 23
22 // static 24 // static
23 URLRequestJob* URLRequestAboutJob::Factory(URLRequest* request, 25 URLRequestJob* URLRequestAboutJob::Factory(URLRequest* request,
24 const std::string& scheme) { 26 const std::string& scheme) {
25 return new URLRequestAboutJob(request); 27 return new URLRequestAboutJob(request);
26 } 28 }
27 29
28 void URLRequestAboutJob::Start() { 30 void URLRequestAboutJob::Start() {
(...skipping 10 matching lines...) Expand all
39 } 41 }
40 42
41 URLRequestAboutJob::~URLRequestAboutJob() { 43 URLRequestAboutJob::~URLRequestAboutJob() {
42 } 44 }
43 45
44 void URLRequestAboutJob::StartAsync() { 46 void URLRequestAboutJob::StartAsync() {
45 NotifyHeadersComplete(); 47 NotifyHeadersComplete();
46 } 48 }
47 49
48 } // namespace net 50 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request.cc ('k') | net/url_request/url_request_error_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698