| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/app/chrome_crash_reporter_client.h" | 5 #include "chrome/app/chrome_crash_reporter_client.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/environment.h" | 8 #include "base/environment.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 env->HasVar(env_vars::kMetroConnected)) { | 128 env->HasVar(env_vars::kMetroConnected)) { |
| 129 return false; | 129 return false; |
| 130 } | 130 } |
| 131 | 131 |
| 132 std::string restart_info; | 132 std::string restart_info; |
| 133 env->GetVar(env_vars::kRestartInfo, &restart_info); | 133 env->GetVar(env_vars::kRestartInfo, &restart_info); |
| 134 | 134 |
| 135 // The CHROME_RESTART var contains the dialog strings separated by '|'. | 135 // The CHROME_RESTART var contains the dialog strings separated by '|'. |
| 136 // See ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment() | 136 // See ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment() |
| 137 // for details. | 137 // for details. |
| 138 std::vector<std::string> dlg_strings; | 138 std::vector<std::string> dlg_strings = base::SplitString( |
| 139 base::SplitString(restart_info, '|', &dlg_strings); | 139 restart_info, "|", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 140 | 140 |
| 141 if (dlg_strings.size() < 3) | 141 if (dlg_strings.size() < 3) |
| 142 return false; | 142 return false; |
| 143 | 143 |
| 144 *title = base::UTF8ToUTF16(dlg_strings[0]); | 144 *title = base::UTF8ToUTF16(dlg_strings[0]); |
| 145 *message = base::UTF8ToUTF16(dlg_strings[1]); | 145 *message = base::UTF8ToUTF16(dlg_strings[1]); |
| 146 *is_rtl_locale = dlg_strings[2] == env_vars::kRtlLocale; | 146 *is_rtl_locale = dlg_strings[2] == env_vars::kRtlLocale; |
| 147 return true; | 147 return true; |
| 148 } | 148 } |
| 149 | 149 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 bool ChromeCrashReporterClient::EnableBreakpadForProcess( | 348 bool ChromeCrashReporterClient::EnableBreakpadForProcess( |
| 349 const std::string& process_type) { | 349 const std::string& process_type) { |
| 350 return process_type == switches::kRendererProcess || | 350 return process_type == switches::kRendererProcess || |
| 351 process_type == switches::kPluginProcess || | 351 process_type == switches::kPluginProcess || |
| 352 process_type == switches::kPpapiPluginProcess || | 352 process_type == switches::kPpapiPluginProcess || |
| 353 process_type == switches::kZygoteProcess || | 353 process_type == switches::kZygoteProcess || |
| 354 process_type == switches::kGpuProcess; | 354 process_type == switches::kGpuProcess; |
| 355 } | 355 } |
| 356 | 356 |
| 357 } // namespace chrome | 357 } // namespace chrome |
| OLD | NEW |