Commit 9b3afa24 authored by Sigurdur Asgeirsson's avatar Sigurdur Asgeirsson Committed by Commit Bot

Retire ScopedObserver in /components/autofill/core/browser/webdata/.

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

Bug: 1145565
Change-Id: I88db09e58a1913cd84214c8179801fd254b9c6c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2533133Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Commit-Queue: Sigurður Ásgeirsson <siggi@chromium.org>
Auto-Submit: Sigurður Ásgeirsson <siggi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#828320}
parent 32adb721
......@@ -306,7 +306,7 @@ AutocompleteSyncBridge::AutocompleteSyncBridge(
web_data_backend_(backend) {
DCHECK(web_data_backend_);
scoped_observer_.Add(web_data_backend_);
scoped_observation_.Observe(web_data_backend_);
LoadMetadata();
}
......
......@@ -10,7 +10,7 @@
#include "base/macros.h"
#include "base/optional.h"
#include "base/scoped_observer.h"
#include "base/scoped_observation.h"
#include "base/supports_user_data.h"
#include "base/threading/thread_checker.h"
#include "components/autofill/core/browser/webdata/autofill_change.h"
......@@ -79,9 +79,9 @@ class AutocompleteSyncBridge
// SupportsUserData, so it's guaranteed to outlive |this|.
AutofillWebDataBackend* const web_data_backend_;
ScopedObserver<AutofillWebDataBackend,
AutofillWebDataServiceObserverOnDBSequence>
scoped_observer_{this};
base::ScopedObservation<AutofillWebDataBackend,
AutofillWebDataServiceObserverOnDBSequence>
scoped_observation_{this};
DISALLOW_COPY_AND_ASSIGN(AutocompleteSyncBridge);
};
......
......@@ -82,7 +82,7 @@ AutofillProfileSyncBridge::AutofillProfileSyncBridge(
web_data_backend_(backend) {
DCHECK(web_data_backend_);
scoped_observer_.Add(web_data_backend_);
scoped_observation_.Observe(web_data_backend_);
LoadMetadata();
}
......
......@@ -10,7 +10,7 @@
#include "base/macros.h"
#include "base/optional.h"
#include "base/scoped_observer.h"
#include "base/scoped_observation.h"
#include "base/supports_user_data.h"
#include "base/threading/thread_checker.h"
#include "components/autofill/core/browser/webdata/autofill_change.h"
......@@ -107,9 +107,9 @@ class AutofillProfileSyncBridge
// SupportsUserData, so it's guaranteed to outlive |this|.
AutofillWebDataBackend* const web_data_backend_;
ScopedObserver<AutofillWebDataBackend,
AutofillWebDataServiceObserverOnDBSequence>
scoped_observer_{this};
base::ScopedObservation<AutofillWebDataBackend,
AutofillWebDataServiceObserverOnDBSequence>
scoped_observation_{this};
DISALLOW_COPY_AND_ASSIGN(AutofillProfileSyncBridge);
};
......
......@@ -330,7 +330,7 @@ AutofillWalletMetadataSyncBridge::AutofillWalletMetadataSyncBridge(
: ModelTypeSyncBridge(std::move(change_processor)),
web_data_backend_(web_data_backend) {
DCHECK(web_data_backend_);
scoped_observer_.Add(web_data_backend_);
scoped_observation_.Observe(web_data_backend_);
LoadDataCacheAndMetadata();
......
......@@ -10,7 +10,7 @@
#include <unordered_set>
#include "base/macros.h"
#include "base/scoped_observer.h"
#include "base/scoped_observation.h"
#include "base/sequence_checker.h"
#include "base/supports_user_data.h"
#include "components/autofill/core/browser/webdata/autofill_change.h"
......@@ -124,9 +124,9 @@ class AutofillWalletMetadataSyncBridge
// SupportsUserData, so it's guaranteed to outlive |this|.
AutofillWebDataBackend* const web_data_backend_;
ScopedObserver<AutofillWebDataBackend,
AutofillWebDataServiceObserverOnDBSequence>
scoped_observer_{this};
base::ScopedObservation<AutofillWebDataBackend,
AutofillWebDataServiceObserverOnDBSequence>
scoped_observation_{this};
// Cache of the local data that allows figuring out the diff for local
// changes; keyed by storage keys.
......
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