don't mix system and bundled ICU
[chromium-blink-merge.git] / net / url_request / url_request_about_job.cc
blob52a069a767f4a55942f0b9fbdfb38c5e0f432456
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
3 // found in the LICENSE file.
5 // Simple implementation of about: protocol handler that treats everything as
6 // about:blank. No other about: features should be available to web content,
7 // so they're not implemented here.
9 #include "net/url_request/url_request_about_job.h"
11 #include "base/bind.h"
12 #include "base/compiler_specific.h"
13 #include "base/message_loop/message_loop.h"
15 namespace net {
17 URLRequestAboutJob::URLRequestAboutJob(URLRequest* request,
18 NetworkDelegate* network_delegate)
19 : URLRequestJob(request, network_delegate),
20 weak_factory_(this) {
23 void URLRequestAboutJob::Start() {
24 // Start reading asynchronously so that all error reporting and data
25 // callbacks happen as they would for network requests.
26 base::MessageLoop::current()->PostTask(
27 FROM_HERE,
28 base::Bind(&URLRequestAboutJob::StartAsync, weak_factory_.GetWeakPtr()));
31 bool URLRequestAboutJob::GetMimeType(std::string* mime_type) const {
32 *mime_type = "text/html";
33 return true;
36 URLRequestAboutJob::~URLRequestAboutJob() {
39 void URLRequestAboutJob::StartAsync() {
40 NotifyHeadersComplete();
43 } // namespace net