| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/breakpad_win.h" | 5 #include "chrome/app/breakpad_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 #include <tchar.h> | 9 #include <tchar.h> |
| 10 | 10 |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 if (!len) | 402 if (!len) |
| 403 return true; | 403 return true; |
| 404 | 404 |
| 405 wchar_t* restart_data = new wchar_t[len + 1]; | 405 wchar_t* restart_data = new wchar_t[len + 1]; |
| 406 ::GetEnvironmentVariableW(ASCIIToWide(env_vars::kRestartInfo).c_str(), | 406 ::GetEnvironmentVariableW(ASCIIToWide(env_vars::kRestartInfo).c_str(), |
| 407 restart_data, len); | 407 restart_data, len); |
| 408 restart_data[len] = 0; | 408 restart_data[len] = 0; |
| 409 // The CHROME_RESTART var contains the dialog strings separated by '|'. | 409 // The CHROME_RESTART var contains the dialog strings separated by '|'. |
| 410 // See PrepareRestartOnCrashEnviroment() function for details. | 410 // See PrepareRestartOnCrashEnviroment() function for details. |
| 411 std::vector<std::wstring> dlg_strings; | 411 std::vector<std::wstring> dlg_strings; |
| 412 SplitString(restart_data, L'|', &dlg_strings); | 412 base::SplitString(restart_data, L'|', &dlg_strings); |
| 413 delete[] restart_data; | 413 delete[] restart_data; |
| 414 if (dlg_strings.size() < 3) | 414 if (dlg_strings.size() < 3) |
| 415 return true; | 415 return true; |
| 416 | 416 |
| 417 // If the UI layout is right-to-left, we need to pass the appropriate MB_XXX | 417 // If the UI layout is right-to-left, we need to pass the appropriate MB_XXX |
| 418 // flags so that an RTL message box is displayed. | 418 // flags so that an RTL message box is displayed. |
| 419 UINT flags = MB_OKCANCEL | MB_ICONWARNING; | 419 UINT flags = MB_OKCANCEL | MB_ICONWARNING; |
| 420 if (dlg_strings[2] == ASCIIToWide(env_vars::kRtlLocale)) | 420 if (dlg_strings[2] == ASCIIToWide(env_vars::kRtlLocale)) |
| 421 flags |= MB_RIGHT | MB_RTLREADING; | 421 flags |= MB_RIGHT | MB_RTLREADING; |
| 422 | 422 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 if (QueueUserWorkItem( | 580 if (QueueUserWorkItem( |
| 581 &InitCrashReporterThread, | 581 &InitCrashReporterThread, |
| 582 info, | 582 info, |
| 583 WT_EXECUTELONGFUNCTION) == 0) { | 583 WT_EXECUTELONGFUNCTION) == 0) { |
| 584 // We failed to queue to the worker pool, initialize in this thread. | 584 // We failed to queue to the worker pool, initialize in this thread. |
| 585 InitCrashReporterThread(info); | 585 InitCrashReporterThread(info); |
| 586 } | 586 } |
| 587 } | 587 } |
| 588 } | 588 } |
| 589 } | 589 } |
| OLD | NEW |