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 "shell/application_manager/network_fetcher.h" | 5 #include "shell/application_manager/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/trace_event/trace_event.h" | 18 #include "base/trace_event/trace_event.h" |
| 19 #include "build/build_config.h" |
19 #include "crypto/secure_hash.h" | 20 #include "crypto/secure_hash.h" |
20 #include "crypto/sha2.h" | 21 #include "crypto/sha2.h" |
21 #include "mojo/converters/url/url_type_converters.h" | 22 #include "mojo/converters/url/url_type_converters.h" |
22 #include "mojo/data_pipe_utils/data_pipe_utils.h" | 23 #include "mojo/data_pipe_utils/data_pipe_utils.h" |
23 #include "shell/application_manager/data_pipe_peek.h" | 24 #include "shell/application_manager/data_pipe_peek.h" |
24 | 25 |
25 namespace shell { | 26 namespace shell { |
26 | 27 |
27 namespace { | 28 namespace { |
28 #if defined(OS_LINUX) | 29 #if defined(OS_LINUX) |
29 char kArchitecture[] = "linux-x64"; | 30 char kArchitecture[] = "linux-x64"; |
30 #elif defined(OS_ANDROID) | 31 #elif defined(OS_ANDROID) |
31 char kArchitecture[] = "android-arm"; | 32 char kArchitecture[] = "android-arm"; |
| 33 #elif defined(OS_MACOSX) |
| 34 char kArchitecture[] = "macosx"; |
32 #else | 35 #else |
33 #error "Unsupported." | 36 #error "Unsupported." |
34 #endif | 37 #endif |
35 }; | 38 }; |
36 | 39 |
37 NetworkFetcher::NetworkFetcher( | 40 NetworkFetcher::NetworkFetcher( |
38 bool disable_cache, | 41 bool disable_cache, |
39 const GURL& url, | 42 const GURL& url, |
40 mojo::URLResponseDiskCache* url_response_disk_cache, | 43 mojo::URLResponseDiskCache* url_response_disk_cache, |
41 mojo::NetworkService* network_service, | 44 mojo::NetworkService* network_service, |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 << "while fetching " << response->url; | 188 << "while fetching " << response->url; |
186 loader_callback_.Run(nullptr); | 189 loader_callback_.Run(nullptr); |
187 return; | 190 return; |
188 } | 191 } |
189 | 192 |
190 response_ = response.Pass(); | 193 response_ = response.Pass(); |
191 loader_callback_.Run(owner.Pass()); | 194 loader_callback_.Run(owner.Pass()); |
192 } | 195 } |
193 | 196 |
194 } // namespace shell | 197 } // namespace shell |
OLD | NEW |