OLD | NEW |
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 "chrome/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 2478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2489 DCHECK(!app_data_path.empty()); | 2489 DCHECK(!app_data_path.empty()); |
2490 | 2490 |
2491 flags = base::File::FLAG_OPEN | base::File::FLAG_READ; | 2491 flags = base::File::FLAG_OPEN | base::File::FLAG_READ; |
2492 base::FilePath icudata_path = | 2492 base::FilePath icudata_path = |
2493 app_data_path.AppendASCII("icudtl.dat"); | 2493 app_data_path.AppendASCII("icudtl.dat"); |
2494 base::File icudata_file(icudata_path, flags); | 2494 base::File icudata_file(icudata_path, flags); |
2495 DCHECK(icudata_file.IsValid()); | 2495 DCHECK(icudata_file.IsValid()); |
2496 mappings->Transfer(kAndroidICUDataDescriptor, | 2496 mappings->Transfer(kAndroidICUDataDescriptor, |
2497 base::ScopedFD(icudata_file.TakePlatformFile())); | 2497 base::ScopedFD(icudata_file.TakePlatformFile())); |
2498 | 2498 |
| 2499 #ifdef V8_USE_EXTERNAL_STARTUP_DATA |
| 2500 base::FilePath v8_data_path; |
| 2501 PathService::Get(base::DIR_ANDROID_APP_DATA, &v8_data_path); |
| 2502 DCHECK(!v8_data_path.empty()); |
| 2503 |
| 2504 int file_flags = base::File::FLAG_OPEN | base::File::FLAG_READ; |
| 2505 base::FilePath v8_natives_data_path = |
| 2506 v8_data_path.AppendASCII("natives_blob.bin"); |
| 2507 base::FilePath v8_snapshot_data_path = |
| 2508 v8_data_path.AppendASCII("snapshot_blob.bin"); |
| 2509 base::File v8_natives_data_file(v8_natives_data_path, file_flags); |
| 2510 base::File v8_snapshot_data_file(v8_snapshot_data_path, file_flags); |
| 2511 DCHECK(v8_natives_data_file.IsValid()); |
| 2512 DCHECK(v8_snapshot_data_file.IsValid()); |
| 2513 mappings->Transfer(kV8NativesDataDescriptor, |
| 2514 base::ScopedFD(v8_natives_data_file.TakePlatformFile())); |
| 2515 mappings->Transfer(kV8SnapshotDataDescriptor, |
| 2516 base::ScopedFD(v8_snapshot_data_file.TakePlatformFile())); |
| 2517 #endif // V8_USE_EXTERNAL_STARTUP_DATA |
| 2518 |
2499 #else | 2519 #else |
2500 int crash_signal_fd = GetCrashSignalFD(command_line); | 2520 int crash_signal_fd = GetCrashSignalFD(command_line); |
2501 if (crash_signal_fd >= 0) { | 2521 if (crash_signal_fd >= 0) { |
2502 mappings->Share(kCrashDumpSignal, crash_signal_fd); | 2522 mappings->Share(kCrashDumpSignal, crash_signal_fd); |
2503 } | 2523 } |
2504 #endif // defined(OS_ANDROID) | 2524 #endif // defined(OS_ANDROID) |
2505 } | 2525 } |
2506 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) | 2526 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) |
2507 | 2527 |
2508 #if defined(OS_WIN) | 2528 #if defined(OS_WIN) |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2642 switches::kDisableWebRtcEncryption, | 2662 switches::kDisableWebRtcEncryption, |
2643 }; | 2663 }; |
2644 to_command_line->CopySwitchesFrom(from_command_line, | 2664 to_command_line->CopySwitchesFrom(from_command_line, |
2645 kWebRtcDevSwitchNames, | 2665 kWebRtcDevSwitchNames, |
2646 arraysize(kWebRtcDevSwitchNames)); | 2666 arraysize(kWebRtcDevSwitchNames)); |
2647 } | 2667 } |
2648 } | 2668 } |
2649 #endif // defined(ENABLE_WEBRTC) | 2669 #endif // defined(ENABLE_WEBRTC) |
2650 | 2670 |
2651 } // namespace chrome | 2671 } // namespace chrome |
OLD | NEW |