Chromium Code Reviews| Index: blimp/engine/app/blimp_engine_crash_keys.cc |
| diff --git a/blimp/engine/app/blimp_engine_crash_keys.cc b/blimp/engine/app/blimp_engine_crash_keys.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..83042ef551626446bf999df9b52a3369b8a88fc9 |
| --- /dev/null |
| +++ b/blimp/engine/app/blimp_engine_crash_keys.cc |
| @@ -0,0 +1,76 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "blimp/engine/app/blimp_engine_crash_keys.h" |
| + |
| +#include <vector> |
| + |
| +#include "base/debug/crash_logging.h" |
| +#include "components/crash/core/common/crash_keys.h" |
| + |
| +namespace blimp { |
| +namespace engine { |
| + |
| +size_t RegisterEngineCrashKeys() { |
| + // For now these need to be kept relatively up to date with those in |
| + // //chrome/common/crash_keys.cc::RegisterChromeCrashKeys() |
| + // All of the keys used in //content and //components/crash must show up |
| + // here. |
| + // TODO(marcinjb): Change the approach when http://crbug.com/598854 is |
| + // resolved. |
| + const std::vector<base::debug::CrashKey> engine_keys = { |
|
Kevin M
2016/05/02 22:05:31
Oh noes, brace initialization isn't allowed yet :-
marcinjb
2016/05/03 18:06:58
I saw some people breaking the rules and thought t
|
| + { crash_keys::kClientId, crash_keys::kSmallSize }, |
| + { crash_keys::kChannel, crash_keys::kSmallSize }, |
| + { crash_keys::kNumVariations, crash_keys::kSmallSize }, |
| + { crash_keys::kVariations, crash_keys::kLargeSize }, |
| + |
| + // //content crash keys |
| + { "discardable-memory-allocated", crash_keys::kSmallSize }, |
| + { "discardable-memory-free", crash_keys::kSmallSize }, |
| + { "ppapi_path", crash_keys::kMediumSize }, |
| + { "subresource_url", crash_keys::kLargeSize }, |
| + { "total-discardable-memory-allocated", crash_keys::kSmallSize }, |
| + { "channel_error_bt", crash_keys::kMediumSize }, |
|
Kevin M
2016/05/02 22:05:31
Let's keep each block of pairs alphabetized
marcinjb
2016/05/03 18:06:58
This was mostly a copy and paste job from //chrome
|
| + { "remove_route_bt", crash_keys::kMediumSize }, |
| + { "rwhvm_window", crash_keys::kMediumSize }, |
| + |
| + // Temporary for http://crbug.com/575245. |
| + { "swapout_frame_id", crash_keys::kSmallSize }, |
| + { "swapout_proxy_id", crash_keys::kSmallSize }, |
| + { "swapout_view_id", crash_keys::kSmallSize }, |
| + { "commit_frame_id", crash_keys::kSmallSize }, |
| + { "commit_proxy_id", crash_keys::kSmallSize }, |
| + { "commit_view_id", crash_keys::kSmallSize }, |
| + { "commit_main_render_frame_id", crash_keys::kSmallSize }, |
| + { "newproxy_proxy_id", crash_keys::kSmallSize }, |
| + { "newproxy_view_id", crash_keys::kSmallSize }, |
| + { "newproxy_opener_id", crash_keys::kSmallSize }, |
| + { "newproxy_parent_id", crash_keys::kSmallSize }, |
| + { "rvinit_view_id", crash_keys::kSmallSize }, |
| + { "rvinit_proxy_id", crash_keys::kSmallSize }, |
| + { "rvinit_main_frame_id", crash_keys::kSmallSize }, |
| + { "initrf_frame_id", crash_keys::kSmallSize }, |
| + { "initrf_proxy_id", crash_keys::kSmallSize }, |
| + { "initrf_view_id", crash_keys::kSmallSize }, |
| + { "initrf_main_frame_id", crash_keys::kSmallSize }, |
| + { "initrf_view_is_live", crash_keys::kSmallSize }, |
| + |
| + // Temporary for https://crbug.com/591478. |
| + { "initrf_parent_proxy_exists", crash_keys::kSmallSize }, |
| + { "initrf_render_view_is_live", crash_keys::kSmallSize }, |
| + { "initrf_parent_is_in_same_site_instance", crash_keys::kSmallSize}, |
| + { "initrf_parent_process_is_live", crash_keys::kSmallSize}, |
| + { "initrf_root_is_in_same_site_instance", crash_keys::kSmallSize}, |
| + { "initrf_root_is_in_same_site_instance_as_parent", |
| + crash_keys::kSmallSize}, |
| + { "initrf_root_process_is_live", crash_keys::kSmallSize}, |
| + { "initrf_root_proxy_is_live", crash_keys::kSmallSize}, |
| + }; |
| + |
| + return base::debug::InitCrashKeys(&engine_keys.at(0), engine_keys.size(), |
| + crash_keys::kChunkMaxLength); |
| +} |
| + |
| +} // namespace engine |
| +} // namespace blimp |