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

Side by Side Diff: chromecast/browser/cast_content_browser_client.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chromecast/browser/cast_content_browser_client.h" 5 #include "chromecast/browser/cast_content_browser_client.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 int render_process_id, 307 int render_process_id,
308 int opener_id, 308 int opener_id,
309 bool* no_javascript_access) { 309 bool* no_javascript_access) {
310 *no_javascript_access = true; 310 *no_javascript_access = true;
311 return false; 311 return false;
312 } 312 }
313 313
314 void CastContentBrowserClient::GetAdditionalMappedFilesForChildProcess( 314 void CastContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
315 const base::CommandLine& command_line, 315 const base::CommandLine& command_line,
316 int child_process_id, 316 int child_process_id,
317 content::FileDescriptorInfo* mappings) { 317 content::FileDescriptorInfo* mappings
318 #if defined(OS_ANDROID)
319 ,
320 std::map<int, base::MemoryMappedFile::Region>* regions
321 #endif
322 ) {
318 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) 323 #if defined(V8_USE_EXTERNAL_STARTUP_DATA)
319 if (v8_natives_fd_.get() == -1 || v8_snapshot_fd_.get() == -1) { 324 if (v8_natives_fd_.get() == -1 || v8_snapshot_fd_.get() == -1) {
320 int v8_natives_fd = -1; 325 int v8_natives_fd = -1;
321 int v8_snapshot_fd = -1; 326 int v8_snapshot_fd = -1;
322 if (gin::V8Initializer::OpenV8FilesForChildProcesses(&v8_natives_fd, 327 if (gin::V8Initializer::OpenV8FilesForChildProcesses(&v8_natives_fd,
323 &v8_snapshot_fd)) { 328 &v8_snapshot_fd)) {
324 v8_natives_fd_.reset(v8_natives_fd); 329 v8_natives_fd_.reset(v8_natives_fd);
325 v8_snapshot_fd_.reset(v8_snapshot_fd); 330 v8_snapshot_fd_.reset(v8_snapshot_fd);
326 } 331 }
327 } 332 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 process_type, dumps_path, false /* upload */); 419 process_type, dumps_path, false /* upload */);
415 // StartUploaderThread() even though upload is diferred. 420 // StartUploaderThread() even though upload is diferred.
416 // Breakpad-related memory is freed in the uploader thread. 421 // Breakpad-related memory is freed in the uploader thread.
417 crash_handler->StartUploaderThread(); 422 crash_handler->StartUploaderThread();
418 return crash_handler; 423 return crash_handler;
419 } 424 }
420 #endif // !defined(OS_ANDROID) 425 #endif // !defined(OS_ANDROID)
421 426
422 } // namespace shell 427 } // namespace shell
423 } // namespace chromecast 428 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698