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/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 <userenv.h> | 10 #include <userenv.h> |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 g_num_of_experiments_offset = g_custom_entries->size(); | 415 g_num_of_experiments_offset = g_custom_entries->size(); |
416 g_custom_entries->push_back( | 416 g_custom_entries->push_back( |
417 google_breakpad::CustomInfoEntry(L"num-experiments", L"N/A")); | 417 google_breakpad::CustomInfoEntry(L"num-experiments", L"N/A")); |
418 | 418 |
419 g_experiment_chunks_offset = g_custom_entries->size(); | 419 g_experiment_chunks_offset = g_custom_entries->size(); |
420 // We depend on this in UpdateExperiments... | 420 // We depend on this in UpdateExperiments... |
421 DCHECK_NE(0UL, g_experiment_chunks_offset); | 421 DCHECK_NE(0UL, g_experiment_chunks_offset); |
422 // And the test code depends on this. | 422 // And the test code depends on this. |
423 DCHECK_EQ(g_num_of_experiments_offset + 1, g_experiment_chunks_offset); | 423 DCHECK_EQ(g_num_of_experiments_offset + 1, g_experiment_chunks_offset); |
424 // one-based index for the name suffix. | 424 // one-based index for the name suffix. |
425 for (int i = 1; i <= kMaxReportedExperimentChunks; ++i) { | 425 for (int i = 1; i <= kMaxReportedVariationChunks; ++i) { |
426 g_custom_entries->push_back(google_breakpad::CustomInfoEntry( | 426 g_custom_entries->push_back(google_breakpad::CustomInfoEntry( |
427 base::StringPrintf(L"experiment-chunk-%i", i).c_str(), L"")); | 427 base::StringPrintf(L"experiment-chunk-%i", i).c_str(), L"")); |
428 } | 428 } |
429 | 429 |
430 static google_breakpad::CustomClientInfo custom_client_info; | 430 static google_breakpad::CustomClientInfo custom_client_info; |
431 custom_client_info.entries = &g_custom_entries->front(); | 431 custom_client_info.entries = &g_custom_entries->front(); |
432 custom_client_info.count = g_custom_entries->size(); | 432 custom_client_info.count = g_custom_entries->size(); |
433 | 433 |
434 return &custom_client_info; | 434 return &custom_client_info; |
435 } | 435 } |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 previous_filter = SetUnhandledExceptionFilter(filter); | 914 previous_filter = SetUnhandledExceptionFilter(filter); |
915 } | 915 } |
916 | 916 |
917 void StringVectorToCStringVector(const std::vector<std::wstring>& wstrings, | 917 void StringVectorToCStringVector(const std::vector<std::wstring>& wstrings, |
918 std::vector<const wchar_t*>* cstrings) { | 918 std::vector<const wchar_t*>* cstrings) { |
919 cstrings->clear(); | 919 cstrings->clear(); |
920 cstrings->reserve(wstrings.size()); | 920 cstrings->reserve(wstrings.size()); |
921 for (size_t i = 0; i < wstrings.size(); ++i) | 921 for (size_t i = 0; i < wstrings.size(); ++i) |
922 cstrings->push_back(wstrings[i].c_str()); | 922 cstrings->push_back(wstrings[i].c_str()); |
923 } | 923 } |
OLD | NEW |