summaryrefslogtreecommitdiffstats
path: root/chrome/common/child_process_logging_posix.cc
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-19 07:06:47 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-19 07:06:47 +0000
commita73bf871a1cb0175a23305ff60bfd1df5fb3b367 (patch)
tree68f40c658f88c7356b4bcedc6c6e99cd2668674b /chrome/common/child_process_logging_posix.cc
parentdff5bb1b4c14c06c095e5766a381ea90ca33d7af (diff)
downloadchromium_src-a73bf871a1cb0175a23305ff60bfd1df5fb3b367.zip
chromium_src-a73bf871a1cb0175a23305ff60bfd1df5fb3b367.tar.gz
chromium_src-a73bf871a1cb0175a23305ff60bfd1df5fb3b367.tar.bz2
Set the command line switches in crash reports using the crash key logging system.
BUG=77656 Review URL: https://chromiumcodereview.appspot.com/24204003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224070 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/child_process_logging_posix.cc')
-rw-r--r--chrome/common/child_process_logging_posix.cc23
1 files changed, 0 insertions, 23 deletions
diff --git a/chrome/common/child_process_logging_posix.cc b/chrome/common/child_process_logging_posix.cc
index 9bbb804..68f72d2 100644
--- a/chrome/common/child_process_logging_posix.cc
+++ b/chrome/common/child_process_logging_posix.cc
@@ -4,7 +4,6 @@
#include "chrome/common/child_process_logging.h"
-#include "base/command_line.h"
#include "base/format_macros.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
@@ -24,13 +23,8 @@ static const size_t kClientIdSize = 32 + 1;
char g_client_id[kClientIdSize];
static const size_t kNumSize = 32;
-char g_num_switches[kNumSize] = "";
char g_num_variations[kNumSize] = "";
-// Assume command line switches are less than 64 chars.
-static const size_t kMaxSwitchesSize = kSwitchLen * kMaxSwitches + 1;
-char g_switches[kMaxSwitchesSize] = "";
-
static const size_t kMaxVariationChunksSize =
kMaxVariationChunkSize * kMaxReportedVariationChunks + 1;
char g_variation_chunks[kMaxVariationChunksSize] = "";
@@ -51,23 +45,6 @@ std::string GetClientId() {
return std::string(g_client_id);
}
-void SetCommandLine(const CommandLine* command_line) {
- const CommandLine::StringVector& argv = command_line->argv();
-
- snprintf(g_num_switches, arraysize(g_num_switches), "%" PRIuS,
- argv.size() - 1);
-
- std::string command_line_str;
- for (size_t argv_i = 1;
- argv_i < argv.size() && argv_i <= kMaxSwitches;
- ++argv_i) {
- command_line_str += argv[argv_i];
- // Truncate long switches, align short ones with spaces to be trimmed later.
- command_line_str.resize(argv_i * kSwitchLen, ' ');
- }
- base::strlcpy(g_switches, command_line_str.c_str(), arraysize(g_switches));
-}
-
void SetExperimentList(const std::vector<string16>& experiments) {
std::vector<string16> chunks;
chrome_variations::GenerateVariationChunks(experiments, &chunks);