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

Unified Diff: content/public/common/crash_keys.cc

Issue 1849413003: Define crash keys in the directory hierarchy where they are used. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with head Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/common/crash_keys.h ('k') | media/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/crash_keys.cc
diff --git a/content/public/common/crash_keys.cc b/content/public/common/crash_keys.cc
new file mode 100644
index 0000000000000000000000000000000000000000..8488ef02fedd2ffc3652fdacbbec6ea0fa3fc802
--- /dev/null
+++ b/content/public/common/crash_keys.cc
@@ -0,0 +1,98 @@
+// 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 "content/public/common/crash_keys.h"
+
+#include <vector>
+
+#include "base/logging.h"
+#include "build/build_config.h"
+#include "components/crash/core/common/crash_keys.h"
+
+namespace crash_keys {
+
+// Crash keys
+const char kDiscardableMemoryAllocated[] = "discardable-memory-allocated";
+const char kDiscardableMemoryFree[] = "discardable-memory-free";
+const char kFontKeyName[] = "font_key_name";
+const char kPpapiPath[] = "ppapi_path";
+const char kSubresourceUrl[] = "subresource_url";
+const char kTotalDiscardableMemoryAllocated[] =
+ "total-discardable-memory-allocated";
+
+#if defined(OS_MACOSX)
+const char kChannelErrorBt[] = "channel_error_bt";
+const char kRemoveRouteBt[] = "remove_route_bt";
+const char kRwhvmWindow[] = "rhvm_window";
+#endif
+
+// Temporary for http://crbug.com/575245
+const char kSwapoutFrameId[] = "swapout_frame_id";
+const char kSwapoutProxyId[] = "swapout_proxy_id";
+const char kSwapoutViewId[] = "swapout_view_id";
+const char kCommitFrameId[] = "commit_frame_id";
+const char kCommitProxyId[] = "commit_proxy_id";
+const char kCommitViewId[] = "commit_view_id";
+const char kCommitMainRenderFrameId[] = "commit_main_render_frame_id";
+const char kNewproxyProxyId[] = "newproxy_proxy_id";
+const char kNewproxyViewId[] = "newproxy_view_id";
+const char kNewproxyOpenerId[] = "newproxy_opener_id";
+const char kNewproxyParentId[] = "newproxy_parent_id";
+const char kRvinitViewId[] = "rvinit_view_id";
+const char kRvinitProxyId[] = "rvinit_proxy_id";
+const char kRvinitMainFrameId[] = "rvinit_main_frame_id";
+const char kInitrfFrameId[] = "initrf_frame_id";
+const char kInitrfViewId[] = "initrf_view_id";
+const char kInitrfMainFrameId[] = "initrf_main_frame_id";
+const char kInitrfViewIsLive[] = "initrf_view_is_live";
+
+// Temporary for http://crbug.com/591478
+const char kInitrfParentProxyExists[] = "initrf_parent_proxy_exists";
+const char kInitrfRenderViewIsLive[] = "initrf_render_view_is_live";
+
+void AppendContentCrashKeys(std::vector<base::debug::CrashKey>* keys) {
+ DCHECK(keys);
+ const std::vector<base::debug::CrashKey> content_keys = {
+ { kDiscardableMemoryAllocated, kSmallSize },
+ { kDiscardableMemoryFree, kSmallSize },
+ { kFontKeyName, kSmallSize },
+ { kPpapiPath, kMediumSize },
+ { kSubresourceUrl, kLargeSize },
+ { kTotalDiscardableMemoryAllocated, kSmallSize },
+
+#if defined(OS_MACOSX)
+ { kChannelErrorBt, kMediumSize },
+ { kRemoveRouteBt, kMediumSize },
+ { kRwhvmWindow, kMediumSize },
+#endif
+
+ // Temporary for http://crbug.com/575245
+ { kSwapoutFrameId, kSmallSize },
+ { kSwapoutProxyId, kSmallSize },
+ { kSwapoutViewId, kSmallSize },
+ { kCommitFrameId, kSmallSize },
+ { kCommitProxyId, kSmallSize },
+ { kCommitViewId, kSmallSize },
+ { kCommitMainRenderFrameId, kSmallSize },
+ { kNewproxyProxyId, kSmallSize },
+ { kNewproxyViewId, kSmallSize },
+ { kNewproxyOpenerId, kSmallSize },
+ { kNewproxyParentId, kSmallSize },
+ { kRvinitViewId, kSmallSize },
+ { kRvinitProxyId, kSmallSize },
+ { kRvinitMainFrameId, kSmallSize },
+ { kInitrfFrameId, kSmallSize },
+ { kInitrfViewId, kSmallSize },
+ { kInitrfMainFrameId, kSmallSize },
+ { kInitrfViewIsLive, kSmallSize },
+
+ // Temporary for http://crbug.com/591478
+ { kInitrfParentProxyExists, kSmallSize },
+ { kInitrfRenderViewIsLive, kSmallSize },
+ };
+
+ keys->insert(keys->end(), content_keys.begin(), content_keys.end());
+}
+
+} // namespace crash_keys
« no previous file with comments | « content/public/common/crash_keys.h ('k') | media/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698