| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include <vector> | 10 #include <vector> |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 product = L"Chrome"; | 71 product = L"Chrome"; |
| 72 version = L"0.0.0.0-devel"; | 72 version = L"0.0.0.0-devel"; |
| 73 } | 73 } |
| 74 | 74 |
| 75 // Common entries. | 75 // Common entries. |
| 76 google_breakpad::CustomInfoEntry ver_entry(L"ver", version.c_str()); | 76 google_breakpad::CustomInfoEntry ver_entry(L"ver", version.c_str()); |
| 77 google_breakpad::CustomInfoEntry prod_entry(L"prod", product.c_str()); | 77 google_breakpad::CustomInfoEntry prod_entry(L"prod", product.c_str()); |
| 78 google_breakpad::CustomInfoEntry plat_entry(L"plat", L"Win32"); | 78 google_breakpad::CustomInfoEntry plat_entry(L"plat", L"Win32"); |
| 79 google_breakpad::CustomInfoEntry type_entry(L"ptype", type.c_str()); | 79 google_breakpad::CustomInfoEntry type_entry(L"ptype", type.c_str()); |
| 80 | 80 |
| 81 if (type == L"renderer") { | 81 if (type == L"renderer" || type == L"plugin") { |
| 82 // If we're a renderer create entries for the URL. Currently we only allow | 82 // Create entries for the URL. Currently we only allow each chunk to be 64 |
| 83 // each chunk to be 64 characters, which isn't enough for a URL. As a hack | 83 // characters, which isn't enough for a URL. As a hack we create 8 entries |
| 84 // we create 8 entries and split the URL across the entries. | 84 // and split the URL across the entries. |
| 85 google_breakpad::CustomInfoEntry url1(L"url-chunk-1", L""); | 85 google_breakpad::CustomInfoEntry url1(L"url-chunk-1", L""); |
| 86 google_breakpad::CustomInfoEntry url2(L"url-chunk-2", L""); | 86 google_breakpad::CustomInfoEntry url2(L"url-chunk-2", L""); |
| 87 google_breakpad::CustomInfoEntry url3(L"url-chunk-3", L""); | 87 google_breakpad::CustomInfoEntry url3(L"url-chunk-3", L""); |
| 88 google_breakpad::CustomInfoEntry url4(L"url-chunk-4", L""); | 88 google_breakpad::CustomInfoEntry url4(L"url-chunk-4", L""); |
| 89 google_breakpad::CustomInfoEntry url5(L"url-chunk-5", L""); | 89 google_breakpad::CustomInfoEntry url5(L"url-chunk-5", L""); |
| 90 google_breakpad::CustomInfoEntry url6(L"url-chunk-6", L""); | 90 google_breakpad::CustomInfoEntry url6(L"url-chunk-6", L""); |
| 91 google_breakpad::CustomInfoEntry url7(L"url-chunk-7", L""); | 91 google_breakpad::CustomInfoEntry url7(L"url-chunk-7", L""); |
| 92 google_breakpad::CustomInfoEntry url8(L"url-chunk-8", L""); | 92 google_breakpad::CustomInfoEntry url8(L"url-chunk-8", L""); |
| 93 | 93 |
| 94 static google_breakpad::CustomInfoEntry entries[] = | 94 static google_breakpad::CustomInfoEntry entries[] = |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 // the "Do you want to restart" message and then we call the previous filter. | 174 // the "Do you want to restart" message and then we call the previous filter. |
| 175 long WINAPI ChromeExceptionFilter(EXCEPTION_POINTERS* info) { | 175 long WINAPI ChromeExceptionFilter(EXCEPTION_POINTERS* info) { |
| 176 DumpDoneCallback(NULL, NULL, NULL, info, NULL, false); | 176 DumpDoneCallback(NULL, NULL, NULL, info, NULL, false); |
| 177 | 177 |
| 178 if (previous_filter) | 178 if (previous_filter) |
| 179 return previous_filter(info); | 179 return previous_filter(info); |
| 180 | 180 |
| 181 return EXCEPTION_EXECUTE_HANDLER; | 181 return EXCEPTION_EXECUTE_HANDLER; |
| 182 } | 182 } |
| 183 | 183 |
| 184 extern "C" void __declspec(dllexport) __cdecl SetActiveRendererURL( | 184 extern "C" void __declspec(dllexport) __cdecl SetActiveURL( |
| 185 const wchar_t* url_cstring) { | 185 const wchar_t* url_cstring) { |
| 186 DCHECK(url_cstring); | 186 DCHECK(url_cstring); |
| 187 if (!g_url_chunks) | 187 if (!g_url_chunks) |
| 188 return; | 188 return; |
| 189 | 189 |
| 190 std::wstring url(url_cstring); | 190 std::wstring url(url_cstring); |
| 191 size_t num_chunks = g_url_chunks->size(); | 191 size_t num_chunks = g_url_chunks->size(); |
| 192 size_t chunk_index = 0; | 192 size_t chunk_index = 0; |
| 193 size_t url_size = url.size(); | 193 size_t url_size = url.size(); |
| 194 | 194 |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 if (QueueUserWorkItem( | 363 if (QueueUserWorkItem( |
| 364 &InitCrashReporterThread, | 364 &InitCrashReporterThread, |
| 365 info.release(), | 365 info.release(), |
| 366 WT_EXECUTELONGFUNCTION) == 0) { | 366 WT_EXECUTELONGFUNCTION) == 0) { |
| 367 // We failed to queue to the worker pool, initialize in this thread. | 367 // We failed to queue to the worker pool, initialize in this thread. |
| 368 InitCrashReporterThread(info.release()); | 368 InitCrashReporterThread(info.release()); |
| 369 } | 369 } |
| 370 } | 370 } |
| 371 } | 371 } |
| 372 } | 372 } |
| OLD | NEW |