Commit 3d54411f authored by Robert Sesek's avatar Robert Sesek Committed by Commit Bot

crash_keys: Convert "user-cloud-policy-manager-connect-trace" to the new API.

Bug: 598854
Change-Id: I9cfe27590794d63903347f50daa1698ee6961bb1
Reviewed-on: https://chromium-review.googlesource.com/826442
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Reviewed-by: default avatarMaksim Ivanov <emaxx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524096}
parent e714cdc4
......@@ -42,9 +42,6 @@ size_t RegisterWebViewCrashKeys() {
// media/:
{kZeroEncodeDetails, kSmallSize},
// Temporary for https://crbug.com/685996.
{"user-cloud-policy-manager-connect-trace", kMediumSize},
// TODO(sunnyps): Remove after fixing crbug.com/724999.
{"gl-context-set-current-stack-trace", kMediumSize},
};
......
......@@ -88,9 +88,6 @@ size_t RegisterCrashKeysHelper() {
// media/:
{kZeroEncodeDetails, kSmallSize},
// Temporary for https://crbug.com/685996.
{"user-cloud-policy-manager-connect-trace", kMediumSize},
// TODO(sunnyps): Remove after fixing crbug.com/724999.
{"gl-context-set-current-stack-trace", kMediumSize},
};
......
......@@ -10,7 +10,6 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/command_line.h"
#include "base/debug/crash_logging.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_functions.h"
......@@ -27,8 +26,8 @@
#include "chrome/browser/chromeos/policy/wildcard_login_checker.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/common/chrome_content_client.h"
#include "chrome/common/crash_keys.h"
#include "chromeos/chromeos_switches.h"
#include "components/crash/core/common/crash_key.h"
#include "components/policy/core/common/cloud/cloud_external_data_manager.h"
#include "components/policy/core/common/cloud/cloud_policy_refresh_scheduler.h"
#include "components/policy/core/common/cloud/device_management_service.h"
......@@ -136,8 +135,10 @@ void UserCloudPolicyManagerChromeOS::Connect(
// TODO(emaxx): Remove the crash key after the crashes tracked at
// https://crbug.com/685996 are fixed.
if (core()->client()) {
base::debug::SetCrashKeyToStackTrace(
crash_keys::kUserCloudPolicyManagerConnectTrace, connect_callstack_);
static crash_reporter::CrashKeyString<1024> connect_callstack_key(
"user-cloud-policy-manager-connect-trace");
crash_reporter::SetCrashKeyStringToStackTrace(&connect_callstack_key,
connect_callstack_);
} else {
connect_callstack_ = base::debug::StackTrace();
}
......
......@@ -37,9 +37,6 @@ const char kPrinterInfo[] = "prn-info-%" PRIuS;
const char kViewCount[] = "view-count";
const char kUserCloudPolicyManagerConnectTrace[] =
"user-cloud-policy-manager-connect-trace";
size_t RegisterChromeCrashKeys() {
// The following keys may be chunked by the underlying crash logging system,
// but ultimately constitute a single key-value pair.
......@@ -65,9 +62,6 @@ size_t RegisterChromeCrashKeys() {
{kViewCount, kSmallSize},
// Temporary for https://crbug.com/685996.
{kUserCloudPolicyManagerConnectTrace, kMediumSize},
// TODO(sunnyps): Remove after fixing crbug.com/724999.
{"gl-context-set-current-stack-trace", kMediumSize},
};
......
......@@ -80,11 +80,6 @@ extern const char kPrinterInfo[];
// Numbers of active views.
extern const char kViewCount[];
// TEMPORARY: Stack trace for the previous call of the
// UserCloudPolicyManager::Connect() method. The value is set when we trigger a
// browser crash due to an attempt to connect twice. https://crbug.com/685996.
extern const char kUserCloudPolicyManagerConnectTrace[];
} // namespace crash_keys
#endif // CHROME_COMMON_CRASH_KEYS_H_
......@@ -30,9 +30,6 @@ size_t RegisterCastCrashKeys() {
// media/:
{"zero-encode-details", ::crash_keys::kSmallSize},
// Temporary for https://crbug.com/685996.
{"user-cloud-policy-manager-connect-trace", ::crash_keys::kMediumSize},
// TODO(sunnyps): Remove after fixing crbug.com/724999.
{"gl-context-set-current-stack-trace", ::crash_keys::kMediumSize},
};
......
......@@ -140,6 +140,7 @@ source_set("internal") {
deps = [
"//base:i18n",
"//base/third_party/dynamic_annotations",
"//components/crash/core/common:crash_key", # Remove once https://crbug.com/685996 is fixed.
"//components/data_use_measurement/core",
"//components/json_schema",
"//components/prefs",
......
include_rules = [
"-components/policy/core/browser",
"+components/crash/core/common/crash_key.h", # Remove once https://crbug.com/685996 is fixed.
"+components/data_use_measurement/core",
"+extensions/features",
]
......@@ -8,9 +8,9 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/debug/crash_logging.h"
#include "base/memory/ptr_util.h"
#include "base/sequenced_task_runner.h"
#include "components/crash/core/common/crash_key.h"
#include "components/policy/core/common/cloud/cloud_external_data_manager.h"
#include "components/policy/core/common/cloud/cloud_policy_constants.h"
#include "components/policy/core/common/cloud/cloud_policy_service.h"
......@@ -58,8 +58,10 @@ void UserCloudPolicyManager::Connect(
// TODO(emaxx): Remove the crash key after the crashes tracked at
// https://crbug.com/685996 are fixed.
if (core()->client()) {
base::debug::SetCrashKeyToStackTrace(
"user-cloud-policy-manager-connect-trace", connect_callstack_);
static crash_reporter::CrashKeyString<1024> connect_callstack_key(
"user-cloud-policy-manager-connect-trace");
crash_reporter::SetCrashKeyStringToStackTrace(&connect_callstack_key,
connect_callstack_);
} else {
connect_callstack_ = base::debug::StackTrace();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment