Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Side by Side Diff: shell/application_manager/network_fetcher.cc

Issue 1327033004: Allow building mojo_shell and non-graphical apps/services on a Mac (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "crypto/secure_hash.h" 19 #include "crypto/secure_hash.h"
20 #include "crypto/sha2.h" 20 #include "crypto/sha2.h"
21 #include "mojo/converters/url/url_type_converters.h" 21 #include "mojo/converters/url/url_type_converters.h"
22 #include "mojo/data_pipe_utils/data_pipe_utils.h" 22 #include "mojo/data_pipe_utils/data_pipe_utils.h"
23 #include "shell/application_manager/data_pipe_peek.h" 23 #include "shell/application_manager/data_pipe_peek.h"
24 24
25 namespace shell { 25 namespace shell {
26 26
27 namespace { 27 namespace {
28 #if defined(OS_LINUX) 28 #if defined(OS_LINUX)
viettrungluu 2015/09/10 18:11:09 Oops, we should have included build/build_config.h
29 char kArchitecture[] = "linux-x64"; 29 char kArchitecture[] = "linux-x64";
30 #elif defined(OS_ANDROID) 30 #elif defined(OS_ANDROID)
31 char kArchitecture[] = "android-arm"; 31 char kArchitecture[] = "android-arm";
32 #elif defined(OS_MACOSX)
33 char kArchitecture[] = "macosx";
32 #else 34 #else
33 #error "Unsupported." 35 #error "Unsupported."
34 #endif 36 #endif
35 }; 37 };
36 38
37 NetworkFetcher::NetworkFetcher( 39 NetworkFetcher::NetworkFetcher(
38 bool disable_cache, 40 bool disable_cache,
39 const GURL& url, 41 const GURL& url,
40 mojo::URLResponseDiskCache* url_response_disk_cache, 42 mojo::URLResponseDiskCache* url_response_disk_cache,
41 mojo::NetworkService* network_service, 43 mojo::NetworkService* network_service,
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 << "while fetching " << response->url; 187 << "while fetching " << response->url;
186 loader_callback_.Run(nullptr); 188 loader_callback_.Run(nullptr);
187 return; 189 return;
188 } 190 }
189 191
190 response_ = response.Pass(); 192 response_ = response.Pass();
191 loader_callback_.Run(owner.Pass()); 193 loader_callback_.Run(owner.Pass());
192 } 194 }
193 195
194 } // namespace shell 196 } // namespace shell
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698