Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 |
| 19 class NetworkDelegate; | |
|
erikwright (departed)
2012/06/13 15:44:18
Is this forward-decl required?
shalev
2012/06/21 20:03:55
Done.
| |
| 20 | |
| 17 URLRequestAboutJob::URLRequestAboutJob(URLRequest* request) | 21 URLRequestAboutJob::URLRequestAboutJob(URLRequest* request) |
| 18 : URLRequestJob(request), | 22 : URLRequestJob(request, request->context()->network_delegate()), |
| 19 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { | 23 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { |
| 20 } | 24 } |
| 21 | 25 |
| 22 // static | 26 // static |
| 23 URLRequestJob* URLRequestAboutJob::Factory(URLRequest* request, | 27 URLRequestJob* URLRequestAboutJob::Factory(URLRequest* request, |
| 24 const std::string& scheme) { | 28 const std::string& scheme) { |
| 25 return new URLRequestAboutJob(request); | 29 return new URLRequestAboutJob(request); |
| 26 } | 30 } |
| 27 | 31 |
| 28 void URLRequestAboutJob::Start() { | 32 void URLRequestAboutJob::Start() { |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 39 } | 43 } |
| 40 | 44 |
| 41 URLRequestAboutJob::~URLRequestAboutJob() { | 45 URLRequestAboutJob::~URLRequestAboutJob() { |
| 42 } | 46 } |
| 43 | 47 |
| 44 void URLRequestAboutJob::StartAsync() { | 48 void URLRequestAboutJob::StartAsync() { |
| 45 NotifyHeadersComplete(); | 49 NotifyHeadersComplete(); |
| 46 } | 50 } |
| 47 | 51 |
| 48 } // namespace net | 52 } // namespace net |
| OLD | NEW |