summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-25 00:08:09 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-25 00:08:09 +0000
commitdc1b5a682cbf791f48638f326ed32adfe0d64544 (patch)
tree4b09788cd2ecdf45949b1a6802f6e2ce7f3a0fdb /chrome
parent03abea0ff55e55af1d5bf88443a531ad7814b9a7 (diff)
downloadchromium_src-dc1b5a682cbf791f48638f326ed32adfe0d64544.zip
chromium_src-dc1b5a682cbf791f48638f326ed32adfe0d64544.tar.gz
chromium_src-dc1b5a682cbf791f48638f326ed32adfe0d64544.tar.bz2
Rename some chrome.exe exports: SetCommandLine --> SetCommandLine2, SetExperimentList --> SetExperimentList2.
This will avoid mismatched parameter expectations when there is version shear, since their implementations were recently changed. BUG=129390,128541 Review URL: https://chromiumcodereview.appspot.com/10422019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138935 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/breakpad_field_trial_win.cc7
-rw-r--r--chrome/app/breakpad_win.cc15
-rw-r--r--chrome/common/child_process_logging_win.cc8
3 files changed, 18 insertions, 12 deletions
diff --git a/chrome/app/breakpad_field_trial_win.cc b/chrome/app/breakpad_field_trial_win.cc
index a0dc544..b0e6499 100644
--- a/chrome/app/breakpad_field_trial_win.cc
+++ b/chrome/app/breakpad_field_trial_win.cc
@@ -12,7 +12,10 @@
#include "chrome/app/breakpad_win.h"
#include "chrome/common/child_process_logging.h"
-extern "C" void __declspec(dllexport) __cdecl SetExperimentList(
+// Note that this is suffixed with "2" due to a parameter change that was made
+// to the predecessor "SetExperimentList()". If the signature changes again, use
+// a new name.
+extern "C" void __declspec(dllexport) __cdecl SetExperimentList2(
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)
@@ -68,7 +71,7 @@ namespace testing {
void SetExperimentList(const std::vector<string16>& experiment_strings) {
std::vector<const wchar_t*> cstrings;
StringVectorToCStringVector(experiment_strings, &cstrings);
- ::SetExperimentList(&cstrings[0], cstrings.size());
+ ::SetExperimentList2(&cstrings[0], cstrings.size());
}
} // namespace testing
diff --git a/chrome/app/breakpad_win.cc b/chrome/app/breakpad_win.cc
index 90a98e9..0588c88 100644
--- a/chrome/app/breakpad_win.cc
+++ b/chrome/app/breakpad_win.cc
@@ -151,7 +151,10 @@ bool IsBoringCommandLineSwitch(const std::wstring& flag) {
flag == L"--flag-switches-end";
}
-extern "C" void __declspec(dllexport) __cdecl SetCommandLine(
+// Note that this is suffixed with "2" due to a parameter change that was made
+// to the predecessor "SetCommandLine()". If the signature changes again, use
+// a new name.
+extern "C" void __declspec(dllexport) __cdecl SetCommandLine2(
const wchar_t** argv, size_t argc) {
if (!g_custom_entries)
return;
@@ -302,7 +305,7 @@ google_breakpad::CustomClientInfo* GetCustomInfo(const std::wstring& exe_path,
google_breakpad::CustomInfoEntry(L"guid", guid.c_str()));
// Add empty values for the command line switches. We will fill them with
- // actual values as part of SetCommandLine().
+ // actual values as part of SetCommandLine2().
g_num_switches_offset = g_custom_entries->size();
g_custom_entries->push_back(
google_breakpad::CustomInfoEntry(L"num-switches", L""));
@@ -315,12 +318,12 @@ google_breakpad::CustomClientInfo* GetCustomInfo(const std::wstring& exe_path,
}
// Fill in the command line arguments using CommandLine::ForCurrentProcess().
- // The browser process may call SetCommandLine() again later on with a command
- // line that has been augmented with the about:flags experiments.
+ // The browser process may call SetCommandLine2() again later on with a
+ // command line that has been augmented with the about:flags experiments.
std::vector<const wchar_t*> switches;
StringVectorToCStringVector(
CommandLine::ForCurrentProcess()->argv(), &switches);
- SetCommandLine(&switches[0], switches.size());
+ SetCommandLine2(&switches[0], switches.size());
if (type == L"renderer" || type == L"plugin" || type == L"gpu-process") {
g_num_of_views_offset = g_custom_entries->size();
@@ -831,4 +834,4 @@ void StringVectorToCStringVector(const std::vector<std::wstring>& wstrings,
cstrings->reserve(wstrings.size());
for (size_t i = 0; i < wstrings.size(); ++i)
cstrings->push_back(wstrings[i].c_str());
-} \ No newline at end of file
+}
diff --git a/chrome/common/child_process_logging_win.cc b/chrome/common/child_process_logging_win.cc
index 19b3f78..36a37d4 100644
--- a/chrome/common/child_process_logging_win.cc
+++ b/chrome/common/child_process_logging_win.cc
@@ -48,11 +48,11 @@ typedef void (__cdecl *MainSetPrinterInfo)(const wchar_t*);
typedef void (__cdecl *MainSetNumberOfViews)(int);
// exported in breakpad_win.cc:
-// void __declspec(dllexport) __cdecl SetCommandLine
+// void __declspec(dllexport) __cdecl SetCommandLine2
typedef void (__cdecl *MainSetCommandLine)(const wchar_t**, size_t);
// exported in breakpad_field_trial_win.cc:
-// void __declspec(dllexport) __cdecl SetExperimentList
+// void __declspec(dllexport) __cdecl SetExperimentList2
typedef void (__cdecl *MainSetExperimentList)(const wchar_t**, size_t);
// Copied from breakpad_win.cc.
@@ -199,7 +199,7 @@ void SetCommandLine(const CommandLine* command_line) {
if (!exe_module)
return;
set_command_line = reinterpret_cast<MainSetCommandLine>(
- GetProcAddress(exe_module, "SetCommandLine"));
+ GetProcAddress(exe_module, "SetCommandLine2"));
if (!set_command_line)
return;
}
@@ -217,7 +217,7 @@ void SetExperimentList(const std::vector<string16>& state) {
if (!exe_module)
return;
set_experiment_list = reinterpret_cast<MainSetExperimentList>(
- GetProcAddress(exe_module, "SetExperimentList"));
+ GetProcAddress(exe_module, "SetExperimentList2"));
if (!set_experiment_list)
return;
}