Commit 41339b4d authored by Sigurdur Asgeirsson's avatar Sigurdur Asgeirsson Committed by Commit Bot

Retire ScopedObserver in /components/translate.

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=anthonyvd@chromium.org

Bug: 1145565
Change-Id: Ic75c0df148d4ef69da3675276ad5728dd6dcf864
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2532960
Auto-Submit: Sigurður Ásgeirsson <siggi@chromium.org>
Reviewed-by: default avataranthonyvd <anthonyvd@chromium.org>
Commit-Queue: Sigurður Ásgeirsson <siggi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#826443}
parent 891a7b24
......@@ -9,7 +9,7 @@ namespace translate {
TranslateWaiter::TranslateWaiter(ContentTranslateDriver* translate_driver,
WaitEvent wait_event)
: wait_event_(wait_event) {
scoped_observer_.Add(translate_driver);
scoped_observation_.Observe(translate_driver);
}
TranslateWaiter::~TranslateWaiter() = default;
......
......@@ -9,7 +9,7 @@
#include "base/macros.h"
#include "base/run_loop.h"
#include "base/scoped_observer.h"
#include "base/scoped_observation.h"
#include "components/translate/content/browser/content_translate_driver.h"
#include "components/translate/core/common/translate_errors.h"
......@@ -42,8 +42,9 @@ class TranslateWaiter : ContentTranslateDriver::Observer {
private:
WaitEvent wait_event_;
ScopedObserver<ContentTranslateDriver, ContentTranslateDriver::Observer>
scoped_observer_{this};
base::ScopedObservation<ContentTranslateDriver,
ContentTranslateDriver::Observer>
scoped_observation_{this};
base::RunLoop run_loop_;
DISALLOW_COPY_AND_ASSIGN(TranslateWaiter);
......
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