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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 if (completed_synchronously) { | 245 if (completed_synchronously) { |
245 base::MessageLoop::current()->PostTask( | 246 base::MessageLoop::current()->PostTask( |
246 FROM_HERE, | 247 FROM_HERE, |
247 base::Bind(&URLLoaderImpl::ReadMore, weak_ptr_factory_.GetWeakPtr())); | 248 base::Bind(&URLLoaderImpl::ReadMore, weak_ptr_factory_.GetWeakPtr())); |
248 } else { | 249 } else { |
249 ReadMore(); | 250 ReadMore(); |
250 } | 251 } |
251 } | 252 } |
252 | 253 |
253 } // namespace mojo | 254 } // namespace mojo |
OLD | NEW |