Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(469)

Side by Side Diff: chrome/app/breakpad_field_trial_win.cc

Issue 10422019: Rename some chrome.exe exports: SetCommandLine --> SetCommandLine2, SetExperimentList --> SetExperi… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comments on why the new name Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/app/breakpad_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_field_trial_win.h" 5 #include "chrome/app/breakpad_field_trial_win.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
11 #include "breakpad/src/client/windows/common/ipc_protocol.h" 11 #include "breakpad/src/client/windows/common/ipc_protocol.h"
12 #include "chrome/app/breakpad_win.h" 12 #include "chrome/app/breakpad_win.h"
13 #include "chrome/common/child_process_logging.h" 13 #include "chrome/common/child_process_logging.h"
14 14
15 extern "C" void __declspec(dllexport) __cdecl SetExperimentList( 15 // Note that this is suffixed with "2" due to a parameter change that was made
16 // to the predecessor "SetExperimentList()". If the signature changes again, use
17 // a new name.
18 extern "C" void __declspec(dllexport) __cdecl SetExperimentList2(
16 const wchar_t** experiment_strings, size_t experiment_strings_size) { 19 const wchar_t** experiment_strings, size_t experiment_strings_size) {
17 // Make sure we were initialized before we start writing data 20 // Make sure we were initialized before we start writing data
18 if (breakpad_win::g_experiment_chunks_offset == 0) 21 if (breakpad_win::g_experiment_chunks_offset == 0)
19 return; 22 return;
20 23
21 size_t num_chunks = 0; 24 size_t num_chunks = 0;
22 size_t current_experiment = 0; 25 size_t current_experiment = 0;
23 string16 current_chunk(google_breakpad::CustomInfoEntry::kValueMaxLength, 0); 26 string16 current_chunk(google_breakpad::CustomInfoEntry::kValueMaxLength, 0);
24 while (current_experiment < experiment_strings_size && 27 while (current_experiment < experiment_strings_size &&
25 num_chunks < kMaxReportedExperimentChunks) { 28 num_chunks < kMaxReportedExperimentChunks) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 base::StringPrintf( 64 base::StringPrintf(
62 L"%d", static_cast<int>(experiment_strings_size)).c_str(), 65 L"%d", static_cast<int>(experiment_strings_size)).c_str(),
63 google_breakpad::CustomInfoEntry::kValueMaxLength); 66 google_breakpad::CustomInfoEntry::kValueMaxLength);
64 } 67 }
65 68
66 namespace testing { 69 namespace testing {
67 70
68 void SetExperimentList(const std::vector<string16>& experiment_strings) { 71 void SetExperimentList(const std::vector<string16>& experiment_strings) {
69 std::vector<const wchar_t*> cstrings; 72 std::vector<const wchar_t*> cstrings;
70 StringVectorToCStringVector(experiment_strings, &cstrings); 73 StringVectorToCStringVector(experiment_strings, &cstrings);
71 ::SetExperimentList(&cstrings[0], cstrings.size()); 74 ::SetExperimentList2(&cstrings[0], cstrings.size());
72 } 75 }
73 76
74 } // namespace testing 77 } // namespace testing
OLDNEW
« no previous file with comments | « no previous file | chrome/app/breakpad_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698