OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/shell/application_manager/network_fetcher.h" | 5 #include "mojo/shell/network_fetcher.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file.h" | 9 #include "base/files/file.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "base/process/process.h" | 13 #include "base/process/process.h" |
14 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
15 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
16 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
17 #include "base/strings/stringprintf.h" | 17 #include "base/strings/stringprintf.h" |
18 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
19 #include "base/trace_event/trace_event.h" | 19 #include "base/trace_event/trace_event.h" |
20 #include "crypto/secure_hash.h" | 20 #include "crypto/secure_hash.h" |
21 #include "crypto/sha2.h" | 21 #include "crypto/sha2.h" |
22 #include "mojo/common/common_type_converters.h" | 22 #include "mojo/common/common_type_converters.h" |
23 #include "mojo/common/data_pipe_utils.h" | 23 #include "mojo/common/data_pipe_utils.h" |
24 #include "mojo/common/url_type_converters.h" | 24 #include "mojo/common/url_type_converters.h" |
25 #include "mojo/services/network/public/interfaces/network_service.mojom.h" | 25 #include "mojo/services/network/public/interfaces/network_service.mojom.h" |
26 #include "mojo/shell/application_manager/data_pipe_peek.h" | 26 #include "mojo/shell/data_pipe_peek.h" |
27 #include "mojo/shell/switches.h" | 27 #include "mojo/shell/switches.h" |
28 | 28 |
29 namespace mojo { | 29 namespace mojo { |
30 namespace shell { | 30 namespace shell { |
31 | 31 |
32 NetworkFetcher::NetworkFetcher(bool disable_cache, | 32 NetworkFetcher::NetworkFetcher(bool disable_cache, |
33 const GURL& url, | 33 const GURL& url, |
34 NetworkService* network_service, | 34 NetworkService* network_service, |
35 const FetchCallback& loader_callback) | 35 const FetchCallback& loader_callback) |
36 : Fetcher(loader_callback), | 36 : Fetcher(loader_callback), |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 loader_callback_.Run(nullptr); | 242 loader_callback_.Run(nullptr); |
243 return; | 243 return; |
244 } | 244 } |
245 | 245 |
246 response_ = response.Pass(); | 246 response_ = response.Pass(); |
247 loader_callback_.Run(owner.Pass()); | 247 loader_callback_.Run(owner.Pass()); |
248 } | 248 } |
249 | 249 |
250 } // namespace shell | 250 } // namespace shell |
251 } // namespace mojo | 251 } // namespace mojo |
OLD | NEW |