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

Side by Side Diff: content/browser/child_process_launcher.cc

Issue 1147213004: Store and load icudtl.dat directly from the apk rather than extracting on start-up (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@load-from-apk
Patch Set: CHECK(fd > 0) -> CHECK_GE(fd, 0) Created 5 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "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_util.h" 9 #include "base/files/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 files_to_register->Transfer(kPrimaryIPCChannel, ipcfd.Pass()); 139 files_to_register->Transfer(kPrimaryIPCChannel, ipcfd.Pass());
140 #endif 140 #endif
141 #endif 141 #endif
142 142
143 #if defined(OS_ANDROID) 143 #if defined(OS_ANDROID)
144 // Android WebView runs in single process, ensure that we never get here 144 // Android WebView runs in single process, ensure that we never get here
145 // when running in single process mode. 145 // when running in single process mode.
146 CHECK(!cmd_line->HasSwitch(switches::kSingleProcess)); 146 CHECK(!cmd_line->HasSwitch(switches::kSingleProcess));
147 std::map<int, base::MemoryMappedFile::Region> regions; 147 std::map<int, base::MemoryMappedFile::Region> regions;
148 GetContentClient()->browser()->GetAdditionalMappedFilesForChildProcess( 148 GetContentClient()->browser()->GetAdditionalMappedFilesForChildProcess(
149 *cmd_line, child_process_id, files_to_register.get()); 149 *cmd_line, child_process_id, files_to_register.get(), &regions);
150 150
151 StartChildProcess( 151 StartChildProcess(
152 cmd_line->argv(), child_process_id, files_to_register.Pass(), regions, 152 cmd_line->argv(), child_process_id, files_to_register.Pass(), regions,
153 base::Bind(&OnChildProcessStartedAndroid, callback, client_thread_id, 153 base::Bind(&OnChildProcessStartedAndroid, callback, client_thread_id,
154 begin_launch_time, base::Passed(&ipcfd))); 154 begin_launch_time, base::Passed(&ipcfd)));
155 155
156 #elif defined(OS_POSIX) 156 #elif defined(OS_POSIX)
157 // We need to close the client end of the IPC channel to reliably detect 157 // We need to close the client end of the IPC channel to reliably detect
158 // child termination. 158 // child termination.
159 159
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 } 493 }
494 494
495 ChildProcessLauncher::Client* ChildProcessLauncher::ReplaceClientForTest( 495 ChildProcessLauncher::Client* ChildProcessLauncher::ReplaceClientForTest(
496 Client* client) { 496 Client* client) {
497 Client* ret = client_; 497 Client* ret = client_;
498 client_ = client; 498 client_ = client;
499 return ret; 499 return ret;
500 } 500 }
501 501
502 } // namespace content 502 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698