OLD | NEW |
---|---|
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "content/browser/child_process_launcher.h" | 5 #include "content/browser/child_process_launcher.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
167 if (field_trial_handle != base::kInvalidPlatformFile) | 167 if (field_trial_handle != base::kInvalidPlatformFile) |
168 files_to_register->Share(kFieldTrialDescriptor, field_trial_handle); | 168 files_to_register->Share(kFieldTrialDescriptor, field_trial_handle); |
169 #if defined(OS_ANDROID) | 169 #if defined(OS_ANDROID) |
170 files_to_register->Share(kMojoIPCChannel, mojo_fd.get()); | 170 files_to_register->Share(kMojoIPCChannel, mojo_fd.get()); |
171 #else | 171 #else |
172 files_to_register->Transfer(kMojoIPCChannel, std::move(mojo_fd)); | 172 files_to_register->Transfer(kMojoIPCChannel, std::move(mojo_fd)); |
173 #endif | 173 #endif |
174 #endif | 174 #endif |
175 | 175 |
176 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 176 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
177 std::map<int, base::MemoryMappedFile::Region> regions; | 177 std::map<int, base::MemoryMappedFile::Region> regions; |
boliu
2017/01/05 07:02:08
seems incomplete this is still here and the region
Jay Civelli
2017/01/05 17:12:18
You are right. This is part of a bigger CL I am br
| |
178 GetContentClient()->browser()->GetAdditionalMappedFilesForChildProcess( | 178 GetContentClient()->browser()->GetAdditionalMappedFilesForChildProcess( |
179 *cmd_line, child_process_id, files_to_register.get() | 179 *cmd_line, child_process_id, files_to_register.get()); |
180 #if defined(OS_ANDROID) | |
181 , ®ions | |
182 #endif | |
183 ); | |
184 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) | 180 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) |
185 bool snapshot_loaded = false; | 181 bool snapshot_loaded = false; |
186 #if defined(OS_ANDROID) | 182 #if defined(OS_ANDROID) |
187 base::MemoryMappedFile::Region region; | 183 base::MemoryMappedFile::Region region; |
188 auto maybe_register = [®ion, ®ions, &files_to_register](int key, | 184 auto maybe_register = [®ion, ®ions, &files_to_register](int key, |
189 int fd) { | 185 int fd) { |
190 if (fd != -1) { | 186 if (fd != -1) { |
191 files_to_register->Share(key, fd); | 187 files_to_register->Share(key, fd); |
192 regions.insert(std::make_pair(key, region)); | 188 regions.insert(std::make_pair(key, region)); |
193 } | 189 } |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
605 } | 601 } |
606 | 602 |
607 ChildProcessLauncher::Client* ChildProcessLauncher::ReplaceClientForTest( | 603 ChildProcessLauncher::Client* ChildProcessLauncher::ReplaceClientForTest( |
608 Client* client) { | 604 Client* client) { |
609 Client* ret = client_; | 605 Client* ret = client_; |
610 client_ = client; | 606 client_ = client; |
611 return ret; | 607 return ret; |
612 } | 608 } |
613 | 609 |
614 } // namespace content | 610 } // namespace content |
OLD | NEW |