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

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: Keep extracting for components/ 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 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 "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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 files_to_register->Transfer(kPrimaryIPCChannel, ipcfd.Pass()); 140 files_to_register->Transfer(kPrimaryIPCChannel, ipcfd.Pass());
141 #endif 141 #endif
142 #endif 142 #endif
143 143
144 #if defined(OS_ANDROID) 144 #if defined(OS_ANDROID)
145 // Android WebView runs in single process, ensure that we never get here 145 // Android WebView runs in single process, ensure that we never get here
146 // when running in single process mode. 146 // when running in single process mode.
147 CHECK(!cmd_line->HasSwitch(switches::kSingleProcess)); 147 CHECK(!cmd_line->HasSwitch(switches::kSingleProcess));
148 std::map<int, base::MemoryMappedFile::Region> regions; 148 std::map<int, base::MemoryMappedFile::Region> regions;
149 GetContentClient()->browser()->GetAdditionalMappedFilesForChildProcess( 149 GetContentClient()->browser()->GetAdditionalMappedFilesForChildProcess(
150 *cmd_line, child_process_id, files_to_register.get()); 150 *cmd_line, child_process_id, files_to_register.get(), &regions);
151 151
152 StartChildProcess( 152 StartChildProcess(
153 cmd_line->argv(), child_process_id, files_to_register.Pass(), regions, 153 cmd_line->argv(), child_process_id, files_to_register.Pass(), regions,
154 base::Bind(&OnChildProcessStartedAndroid, callback, client_thread_id, 154 base::Bind(&OnChildProcessStartedAndroid, callback, client_thread_id,
155 begin_launch_time, base::Passed(&ipcfd))); 155 begin_launch_time, base::Passed(&ipcfd)));
156 156
157 #elif defined(OS_POSIX) 157 #elif defined(OS_POSIX)
158 // We need to close the client end of the IPC channel to reliably detect 158 // We need to close the client end of the IPC channel to reliably detect
159 // child termination. 159 // child termination.
160 160
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 } 505 }
506 506
507 ChildProcessLauncher::Client* ChildProcessLauncher::ReplaceClientForTest( 507 ChildProcessLauncher::Client* ChildProcessLauncher::ReplaceClientForTest(
508 Client* client) { 508 Client* client) {
509 Client* ret = client_; 509 Client* ret = client_;
510 client_ = client; 510 client_ = client;
511 return ret; 511 return ret;
512 } 512 }
513 513
514 } // namespace content 514 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698