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

Side by Side Diff: components/crash/core/common/crash_keys.cc

Issue 1546143002: Switch to standard integer types in components/, part 1 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/crash/core/common/crash_keys.h" 5 #include "components/crash/core/common/crash_keys.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/crash_logging.h" 8 #include "base/debug/crash_logging.h"
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/strings/string_piece.h" 11 #include "base/strings/string_piece.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
14 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
15 #include "build/build_config.h"
15 16
16 namespace crash_keys { 17 namespace crash_keys {
17 18
18 #if defined(OS_MACOSX) 19 #if defined(OS_MACOSX)
19 // Crashpad owns the "guid" key. Chrome's metrics client ID is a separate ID 20 // Crashpad owns the "guid" key. Chrome's metrics client ID is a separate ID
20 // carried in a distinct "metrics_client_id" field. 21 // carried in a distinct "metrics_client_id" field.
21 const char kMetricsClientId[] = "metrics_client_id"; 22 const char kMetricsClientId[] = "metrics_client_id";
22 #elif defined(OS_WIN) 23 #elif defined(OS_WIN)
23 // TODO(scottmg): While transitioning to Crashpad, there are some executables 24 // TODO(scottmg): While transitioning to Crashpad, there are some executables
24 // that use Crashpad (which use kMetricsClientId), and some that use Breakpad 25 // that use Crashpad (which use kMetricsClientId), and some that use Breakpad
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 std::string key = base::StringPrintf(kSwitchFormat, key_i++); 161 std::string key = base::StringPrintf(kSwitchFormat, key_i++);
161 base::debug::SetCrashKeyValue(key, switch_str); 162 base::debug::SetCrashKeyValue(key, switch_str);
162 } 163 }
163 164
164 // Clear any remaining switches. 165 // Clear any remaining switches.
165 for (; key_i <= kSwitchesMaxCount; ++key_i) 166 for (; key_i <= kSwitchesMaxCount; ++key_i)
166 base::debug::ClearCrashKey(base::StringPrintf(kSwitchFormat, key_i)); 167 base::debug::ClearCrashKey(base::StringPrintf(kSwitchFormat, key_i));
167 } 168 }
168 169
169 } // namespace crash_keys 170 } // namespace crash_keys
OLDNEW
« no previous file with comments | « components/crash/core/common/crash_keys.h ('k') | components/crash/core/common/crash_keys_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698