Commit e92f8547 authored by Sigurdur Asgeirsson's avatar Sigurdur Asgeirsson Committed by Commit Bot

Retire ScopedObserver in /components/crash/content/browser.

ScopedObserver is being deprecated in favor of two new classes:
- base::ScopedObservation for observers that only ever observe
  a single source.
- base::ScopedMultiSourceObservation for observers that do or may
  observe more than a single source.

This CL was uploaded by git cl split.

R=isherman@chromium.org

Bug: 1145565
Change-Id: Ia3b05a0631731402d564aff85953d10be62a2096
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2532718
Commit-Queue: Ilya Sherman <isherman@chromium.org>
Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
Auto-Submit: Sigurður Ásgeirsson <siggi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#826584}
parent d7679e32
......@@ -81,7 +81,7 @@ ChildExitObserver::ChildExitObserver() {
content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
content::NotificationService::AllSources());
BrowserChildProcessObserver::Add(this);
scoped_observer_.Add(crashpad::CrashHandlerHost::Get());
scoped_observation_.Observe(crashpad::CrashHandlerHost::Get());
}
ChildExitObserver::~ChildExitObserver() {
......
......@@ -13,7 +13,7 @@
#include "base/android/child_process_binding_types.h"
#include "base/lazy_instance.h"
#include "base/process/process.h"
#include "base/scoped_observer.h"
#include "base/scoped_observation.h"
#include "base/synchronization/lock.h"
#include "components/crash/content/browser/crash_handler_host_linux.h"
#include "content/public/browser/browser_child_process_observer.h"
......@@ -172,9 +172,9 @@ class ChildExitObserver : public content::BrowserChildProcessObserver,
base::Lock crash_signals_lock_;
std::map<base::ProcessId, int> child_pid_to_crash_signal_;
ScopedObserver<crashpad::CrashHandlerHost,
crashpad::CrashHandlerHost::Observer>
scoped_observer_{this};
base::ScopedObservation<crashpad::CrashHandlerHost,
crashpad::CrashHandlerHost::Observer>
scoped_observation_{this};
DISALLOW_COPY_AND_ASSIGN(ChildExitObserver);
};
......
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