OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "mojo/services/network/url_loader_impl.h" | 5 #include "mojo/services/network/url_loader_impl.h" |
6 | 6 |
| 7 #include "base/message_loop/message_loop.h" |
7 #include "mojo/common/common_type_converters.h" | 8 #include "mojo/common/common_type_converters.h" |
8 #include "mojo/services/network/network_context.h" | 9 #include "mojo/services/network/network_context.h" |
9 #include "net/base/io_buffer.h" | 10 #include "net/base/io_buffer.h" |
10 #include "net/base/load_flags.h" | 11 #include "net/base/load_flags.h" |
11 #include "net/http/http_response_headers.h" | 12 #include "net/http/http_response_headers.h" |
12 | 13 |
13 namespace mojo { | 14 namespace mojo { |
14 namespace { | 15 namespace { |
15 | 16 |
16 const uint32_t kMaxReadSize = 64 * 1024; | 17 const uint32_t kMaxReadSize = 64 * 1024; |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 if (completed_synchronously) { | 278 if (completed_synchronously) { |
278 base::MessageLoop::current()->PostTask( | 279 base::MessageLoop::current()->PostTask( |
279 FROM_HERE, | 280 FROM_HERE, |
280 base::Bind(&URLLoaderImpl::ReadMore, weak_ptr_factory_.GetWeakPtr())); | 281 base::Bind(&URLLoaderImpl::ReadMore, weak_ptr_factory_.GetWeakPtr())); |
281 } else { | 282 } else { |
282 ReadMore(); | 283 ReadMore(); |
283 } | 284 } |
284 } | 285 } |
285 | 286 |
286 } // namespace mojo | 287 } // namespace mojo |
OLD | NEW |