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

Unified Diff: chromecast/browser/cast_browser_main_parts.cc

Issue 2393853002: Refactor CrashDump*Manager to use a shared CrashDumpObserver singleton. (Closed)
Patch Set: Review changes: remove refcounting, ability to unregister clients, move responsibility for posting to clients Created 4 years 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
Index: chromecast/browser/cast_browser_main_parts.cc
diff --git a/chromecast/browser/cast_browser_main_parts.cc b/chromecast/browser/cast_browser_main_parts.cc
index d098b063e22e7e5eed15cac013c518ba6368119a..98c9dbe4577e68c09ea670b36a63d5835e3ac83f 100644
--- a/chromecast/browser/cast_browser_main_parts.cc
+++ b/chromecast/browser/cast_browser_main_parts.cc
@@ -40,6 +40,7 @@
#include "chromecast/browser/pref_service_helper.h"
#include "chromecast/browser/url_request_context_factory.h"
#include "chromecast/chromecast_features.h"
+#include "chromecast/common/global_descriptors.h"
#include "chromecast/common/platform_client_auth.h"
#include "chromecast/media/base/key_systems_common.h"
#include "chromecast/media/base/media_resource_tracker.h"
@@ -297,7 +298,7 @@ CastBrowserMainParts::~CastBrowserMainParts() {
media_thread_->task_runner()->DeleteSoon(
FROM_HERE, media_pipeline_backend_manager_.release());
}
-#endif // !defined(OS_ANDROID)
+#endif // defined(OS_ANDROID)
}
scoped_refptr<base::SingleThreadTaskRunner>
@@ -390,8 +391,10 @@ int CastBrowserMainParts::PreCreateThreads() {
if (!chromecast::CrashHandler::GetCrashDumpLocation(&crash_dumps_dir)) {
LOG(ERROR) << "Could not find crash dump location.";
}
- cast_browser_process_->SetCrashDumpManager(
- base::MakeUnique<breakpad::CrashDumpManager>(crash_dumps_dir));
+ breakpad::CrashDumpObserver::Create();
+ breakpad::CrashDumpObserver::GetInstance()->RegisterClient(
+ base::MakeUnique<breakpad::CrashDumpManager>(crash_dumps_dir,
+ kAndroidMinidumpDescriptor));
#else
base::FilePath home_dir;
CHECK(PathService::Get(DIR_CAST_HOME, &home_dir));

Powered by Google App Engine
This is Rietveld 408576698