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 2624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2635 child_process_id); | 2635 child_process_id); |
2636 if (file.IsValid()) { | 2636 if (file.IsValid()) { |
2637 mappings->push_back(FileDescriptorInfo(kAndroidMinidumpDescriptor, | 2637 mappings->push_back(FileDescriptorInfo(kAndroidMinidumpDescriptor, |
2638 FileDescriptor(file.Pass()))); | 2638 FileDescriptor(file.Pass()))); |
2639 } else { | 2639 } else { |
2640 LOG(ERROR) << "Failed to create file for minidump, crash reporting will " | 2640 LOG(ERROR) << "Failed to create file for minidump, crash reporting will " |
2641 "be disabled for this process."; | 2641 "be disabled for this process."; |
2642 } | 2642 } |
2643 } | 2643 } |
2644 | 2644 |
2645 { | |
jungshik at Google
2014/06/05 23:30:58
nit: I wonder why you enclosed this block with a p
Feng Qian
2014/06/06 17:40:31
I intended to scope variable names, but can remove
| |
2646 base::FilePath app_data_path; | |
2647 PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path); | |
2648 DCHECK(!app_data_path.empty()); | |
2649 | |
2650 int flags = base::File::FLAG_OPEN | base::File::FLAG_READ; | |
2651 base::FilePath icudlt_dat_path = | |
2652 app_data_path.AppendASCII("icudtl.dat"); | |
jungshik at Google
2014/06/05 23:30:57
nit: |icudata_path| would be better, wouldn't it?
Feng Qian
2014/06/06 17:40:31
sure
On 2014/06/05 23:30:57, Jungshik Shin wrote:
| |
2653 base::File file(icudlt_dat_path, flags); | |
2654 DCHECK(file.IsValid()); | |
2655 mappings->push_back(FileDescriptorInfo(kAndroidICUDataDescriptor, | |
2656 FileDescriptor(file.Pass()))); | |
2657 } | |
2645 #else | 2658 #else |
2646 int crash_signal_fd = GetCrashSignalFD(command_line); | 2659 int crash_signal_fd = GetCrashSignalFD(command_line); |
2647 if (crash_signal_fd >= 0) { | 2660 if (crash_signal_fd >= 0) { |
2648 mappings->push_back(FileDescriptorInfo(kCrashDumpSignal, | 2661 mappings->push_back(FileDescriptorInfo(kCrashDumpSignal, |
2649 FileDescriptor(crash_signal_fd, | 2662 FileDescriptor(crash_signal_fd, |
2650 false))); | 2663 false))); |
2651 } | 2664 } |
2652 #endif // defined(OS_ANDROID) | 2665 #endif // defined(OS_ANDROID) |
2653 } | 2666 } |
2654 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) | 2667 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2757 switches::kDisableWebRtcEncryption, | 2770 switches::kDisableWebRtcEncryption, |
2758 }; | 2771 }; |
2759 to_command_line->CopySwitchesFrom(from_command_line, | 2772 to_command_line->CopySwitchesFrom(from_command_line, |
2760 kWebRtcDevSwitchNames, | 2773 kWebRtcDevSwitchNames, |
2761 arraysize(kWebRtcDevSwitchNames)); | 2774 arraysize(kWebRtcDevSwitchNames)); |
2762 } | 2775 } |
2763 } | 2776 } |
2764 #endif // defined(ENABLE_WEBRTC) | 2777 #endif // defined(ENABLE_WEBRTC) |
2765 | 2778 |
2766 } // namespace chrome | 2779 } // namespace chrome |
OLD | NEW |