Index: chrome/app/breakpad_field_trial_win.cc |
diff --git a/chrome/app/breakpad_field_trial_win.cc b/chrome/app/breakpad_field_trial_win.cc |
index f8b04265b84a8c37f00da950bf8b6b0c9a6ab1be..a0dc54457c1a2d61d2edcd52a39c391646e87d49 100644 |
--- a/chrome/app/breakpad_field_trial_win.cc |
+++ b/chrome/app/breakpad_field_trial_win.cc |
@@ -13,7 +13,7 @@ |
#include "chrome/common/child_process_logging.h" |
extern "C" void __declspec(dllexport) __cdecl SetExperimentList( |
- const std::vector<string16>& experiment_strings) { |
+ const wchar_t** experiment_strings, size_t experiment_strings_size) { |
// Make sure we were initialized before we start writing data |
if (breakpad_win::g_experiment_chunks_offset == 0) |
return; |
@@ -21,11 +21,11 @@ extern "C" void __declspec(dllexport) __cdecl SetExperimentList( |
size_t num_chunks = 0; |
size_t current_experiment = 0; |
string16 current_chunk(google_breakpad::CustomInfoEntry::kValueMaxLength, 0); |
- while (current_experiment < experiment_strings.size() && |
+ while (current_experiment < experiment_strings_size && |
num_chunks < kMaxReportedExperimentChunks) { |
// Check if we have enough room to add another experiment to the current |
// chunk string. If not, we commit the current chunk string and start over. |
- if (current_chunk.size() + experiment_strings[current_experiment].size() > |
+ if (current_chunk.size() + wcslen(experiment_strings[current_experiment]) > |
google_breakpad::CustomInfoEntry::kValueMaxLength) { |
base::wcslcpy( |
(*breakpad_win::g_custom_entries)[ |
@@ -58,14 +58,17 @@ extern "C" void __declspec(dllexport) __cdecl SetExperimentList( |
base::wcslcpy( |
(*breakpad_win::g_custom_entries)[ |
breakpad_win::g_num_of_experiments_offset].value, |
- base::StringPrintf(L"%d", experiment_strings.size()).c_str(), |
+ base::StringPrintf( |
+ L"%d", static_cast<int>(experiment_strings_size)).c_str(), |
google_breakpad::CustomInfoEntry::kValueMaxLength); |
} |
namespace testing { |
void SetExperimentList(const std::vector<string16>& experiment_strings) { |
- ::SetExperimentList(experiment_strings); |
+ std::vector<const wchar_t*> cstrings; |
+ StringVectorToCStringVector(experiment_strings, &cstrings); |
+ ::SetExperimentList(&cstrings[0], cstrings.size()); |
} |
} // namespace testing |