summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhaibinlu <haibinlu@chromium.org>2016-03-24 16:49:42 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-24 23:50:42 +0000
commit6781323221029e2f5c0ca1b0f055b81bb2d69153 (patch)
treedddfad581d135ec81cc25a6a56ecbf0f8ea9fbfc
parent4702f9e6ec4a55dd0ada0451395792a9dcd46af0 (diff)
downloadchromium_src-6781323221029e2f5c0ca1b0f055b81bb2d69153.zip
chromium_src-6781323221029e2f5c0ca1b0f055b81bb2d69153.tar.gz
chromium_src-6781323221029e2f5c0ca1b0f055b81bb2d69153.tar.bz2
Revert of Initial addition of blimp crash client code. (patchset #5 id:80001 of https://codereview.chromium.org/1783053002/ )
Reason for revert: Engine crashes. https://bugs.chromium.org/p/chromium/issues/detail?id=597838 Original issue's description: > Initial addition of Blimp engine crash client code. > > This introduces a simple crash client for the engine, which includes a client that will always allow and always upload crash reports with the "Chrome_Blimp_Engine" name. Crash reporting is enabled for all processes. > > BUG=597454 > > Committed: https://crrev.com/b7efce03ce6c4a2c17db1ca6cbd73637544cb0dc > Cr-Commit-Position: refs/heads/master@{#383161} TBR=kmarshall@chromium.org,mark@chromium.org,marcinjb@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=597454 Review URL: https://codereview.chromium.org/1830393002 Cr-Commit-Position: refs/heads/master@{#383193}
-rw-r--r--blimp/engine/BUILD.gn18
-rw-r--r--blimp/engine/DEPS1
-rw-r--r--blimp/engine/Dockerfile2
-rw-r--r--blimp/engine/app/blimp_content_main_delegate.cc25
-rw-r--r--blimp/engine/app/blimp_engine_crash_keys.cc32
-rw-r--r--blimp/engine/app/blimp_engine_crash_keys.h20
-rw-r--r--blimp/engine/app/blimp_engine_crash_reporter_client.cc57
-rw-r--r--blimp/engine/app/blimp_engine_crash_reporter_client.h44
8 files changed, 1 insertions, 198 deletions
diff --git a/blimp/engine/BUILD.gn b/blimp/engine/BUILD.gn
index 0f577c9..0098474 100644
--- a/blimp/engine/BUILD.gn
+++ b/blimp/engine/BUILD.gn
@@ -69,7 +69,6 @@ source_set("app") {
deps = [
":app_ui",
":common",
- ":crash",
":session",
"//base",
"//blimp/common/proto",
@@ -107,23 +106,6 @@ source_set("app_ui") {
]
}
-source_set("crash") {
- sources = [
- "app/blimp_engine_crash_keys.cc",
- "app/blimp_engine_crash_keys.h",
- "app/blimp_engine_crash_reporter_client.cc",
- "app/blimp_engine_crash_reporter_client.h",
- ]
-
- deps = [
- "//base",
- "//components/crash/content/app:app_breakpad_mac_win_to_be_deleted",
- "//components/crash/core/common",
- "//components/version_info",
- "//content/public/common",
- ]
-}
-
source_set("common") {
sources = [
"common/blimp_browser_context.cc",
diff --git a/blimp/engine/DEPS b/blimp/engine/DEPS
index f996963..5c16370 100644
--- a/blimp/engine/DEPS
+++ b/blimp/engine/DEPS
@@ -2,7 +2,6 @@ include_rules = [
"+base",
"+cc",
"-chrome",
- "+components/crash",
"+components/version_info",
"+components/web_cache/renderer",
"+content/public",
diff --git a/blimp/engine/Dockerfile b/blimp/engine/Dockerfile
index 3a8004a..7e3cbba 100644
--- a/blimp/engine/Dockerfile
+++ b/blimp/engine/Dockerfile
@@ -7,7 +7,7 @@ RUN apt-get update && \
apt-get install -yq libdrm2 libfontconfig1 libfreetype6 libgraphite2-3 \
libharfbuzz0b libnspr4 libnss3 libstdc++6
-RUN apt-get update && apt-get install -yq stunnel4 wget
+RUN apt-get install -yq stunnel4
RUN mkdir /engine
diff --git a/blimp/engine/app/blimp_content_main_delegate.cc b/blimp/engine/app/blimp_content_main_delegate.cc
index a3734b1..6fe0b41 100644
--- a/blimp/engine/app/blimp_content_main_delegate.cc
+++ b/blimp/engine/app/blimp_content_main_delegate.cc
@@ -4,32 +4,17 @@
#include "blimp/engine/app/blimp_content_main_delegate.h"
-#include <string>
-
-#include "base/base_switches.h"
-#include "base/command_line.h"
#include "base/files/file.h"
#include "base/files/file_path.h"
-#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/path_service.h"
#include "blimp/common/compositor/blimp_image_serialization_processor.h"
#include "blimp/engine/app/blimp_content_browser_client.h"
#include "blimp/engine/app/blimp_content_renderer_client.h"
-#include "blimp/engine/app/blimp_engine_crash_reporter_client.h"
-#include "components/crash/content/app/breakpad_linux.h"
-#include "components/crash/content/app/crash_reporter_client.h"
-#include "content/public/common/content_switches.h"
#include "ui/base/resource/resource_bundle.h"
namespace blimp {
namespace engine {
-
-// Blimp engine crash client. This should be available globally and should be
-// long lived.
-base::LazyInstance<BlimpEngineCrashReporterClient>
- g_blimp_engine_crash_reporter_client = LAZY_INSTANCE_INITIALIZER;
-
namespace {
void InitLogging() {
logging::LoggingSettings settings;
@@ -58,16 +43,6 @@ bool BlimpContentMainDelegate::BasicStartupComplete(int* exit_code) {
}
void BlimpContentMainDelegate::PreSandboxStartup() {
- // Enable crash reporting for all processes, and initialize the crash
- // reporter client.
- crash_reporter::SetCrashReporterClient(
- g_blimp_engine_crash_reporter_client.Pointer());
- base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
- const std::string process_type =
- cmd->GetSwitchValueASCII(::switches::kProcessType);
- cmd->AppendSwitch(::switches::kEnableCrashReporter);
- breakpad::InitCrashReporter(process_type);
-
InitializeResourceBundle();
}
diff --git a/blimp/engine/app/blimp_engine_crash_keys.cc b/blimp/engine/app/blimp_engine_crash_keys.cc
deleted file mode 100644
index 4290756..0000000
--- a/blimp/engine/app/blimp_engine_crash_keys.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-// 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() {
- const std::vector<base::debug::CrashKey> engine_keys = {
- {::crash_keys::kClientId, ::crash_keys::kSmallSize},
- {::crash_keys::kChannel, ::crash_keys::kSmallSize},
- {::crash_keys::kNumVariations, ::crash_keys::kSmallSize},
- {::crash_keys::kVariations, ::crash_keys::kLargeSize},
- {"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}};
-
- return base::debug::InitCrashKeys(&engine_keys.at(0), engine_keys.size(),
- ::crash_keys::kChunkMaxLength);
-}
-
-} // namespace engine
-} // namespace blimp
diff --git a/blimp/engine/app/blimp_engine_crash_keys.h b/blimp/engine/app/blimp_engine_crash_keys.h
deleted file mode 100644
index ae3deeb..0000000
--- a/blimp/engine/app/blimp_engine_crash_keys.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// 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.
-
-#ifndef BLIMP_ENGINE_APP_BLIMP_ENGINE_CRASH_KEYS_H_
-#define BLIMP_ENGINE_APP_BLIMP_ENGINE_CRASH_KEYS_H_
-
-#include <stddef.h>
-
-namespace blimp {
-namespace engine {
-
-// Registers the crash keys needed for the Blimp engine. Returns the size of the
-// union of all keys.
-size_t RegisterEngineCrashKeys();
-
-} // namespace engine
-} // namespace blimp
-
-#endif // BLIMP_ENGINE_APP_BLIMP_ENGINE_CRASH_KEYS_H_
diff --git a/blimp/engine/app/blimp_engine_crash_reporter_client.cc b/blimp/engine/app/blimp_engine_crash_reporter_client.cc
deleted file mode 100644
index cec9ea9..0000000
--- a/blimp/engine/app/blimp_engine_crash_reporter_client.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-// 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_reporter_client.h"
-
-#include "blimp/engine/app/blimp_engine_crash_keys.h"
-#include "components/crash/core/common/crash_keys.h"
-#include "components/version_info/version_info_values.h"
-#include "content/public/common/content_switches.h"
-
-namespace blimp {
-namespace engine {
-
-BlimpEngineCrashReporterClient::BlimpEngineCrashReporterClient() {}
-BlimpEngineCrashReporterClient::~BlimpEngineCrashReporterClient() {}
-
-void BlimpEngineCrashReporterClient::SetCrashReporterClientIdFromGUID(
- const std::string& client_guid) {
- ::crash_keys::SetMetricsClientIdFromGUID(client_guid);
-}
-
-void BlimpEngineCrashReporterClient::GetProductNameAndVersion(
- const char** product_name,
- const char** version) {
- *product_name = "Chrome_Blimp_Engine";
- *version = PRODUCT_VERSION;
-}
-
-size_t BlimpEngineCrashReporterClient::RegisterCrashKeys() {
- return RegisterEngineCrashKeys();
-}
-
-bool BlimpEngineCrashReporterClient::IsRunningUnattended() {
- // If this returns "true," crash reports will not be uploaded. For now the
- // engine will not be running unattended. Eventually when automated testing
- // harnesses are set up, this should be changed to return "true" in those
- // cases.
- return false;
-}
-
-bool BlimpEngineCrashReporterClient::GetCollectStatsConsent() {
- // Always collect Blimp engine crash reports.
- return true;
-}
-
-bool BlimpEngineCrashReporterClient::EnableBreakpadForProcess(
- const std::string& process_type) {
- return process_type == ::switches::kRendererProcess ||
- process_type == ::switches::kPluginProcess ||
- process_type == ::switches::kPpapiPluginProcess ||
- process_type == ::switches::kZygoteProcess ||
- process_type == ::switches::kGpuProcess;
-}
-
-} // namespace engine
-} // namespace blimp
diff --git a/blimp/engine/app/blimp_engine_crash_reporter_client.h b/blimp/engine/app/blimp_engine_crash_reporter_client.h
deleted file mode 100644
index f22bc51..0000000
--- a/blimp/engine/app/blimp_engine_crash_reporter_client.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// 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.
-
-#ifndef BLIMP_ENGINE_APP_BLIMP_ENGINE_CRASH_REPORTER_CLIENT_H_
-#define BLIMP_ENGINE_APP_BLIMP_ENGINE_CRASH_REPORTER_CLIENT_H_
-
-#include <stddef.h>
-
-#include <string>
-
-#include "base/macros.h"
-#include "components/crash/content/app/crash_reporter_client.h"
-
-namespace blimp {
-namespace engine {
-
-// Crash reporter client for the Blimp engine. This will always collect crash
-// reports, and will always upload reports unless running in a "headless" test
-// mode.
-// This is intended to be built with a Linux OS target only.
-class BlimpEngineCrashReporterClient
- : public crash_reporter::CrashReporterClient {
- public:
- BlimpEngineCrashReporterClient();
- ~BlimpEngineCrashReporterClient() override;
-
- void SetCrashReporterClientIdFromGUID(
- const std::string& client_guid) override;
- void GetProductNameAndVersion(const char** product_name,
- const char** version) override;
- size_t RegisterCrashKeys() override;
- bool IsRunningUnattended() override;
- bool GetCollectStatsConsent() override;
- bool EnableBreakpadForProcess(const std::string& process_type) override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BlimpEngineCrashReporterClient);
-};
-
-} // namespace engine
-} // namespace blimp
-
-#endif // BLIMP_ENGINE_APP_BLIMP_ENGINE_CRASH_REPORTER_CLIENT_H_