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

Unified Diff: components/autofill/content/browser/risk/fingerprint.cc

Issue 1859453002: components/autofill: scoped_ptr -> unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed Created 4 years, 8 months 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: components/autofill/content/browser/risk/fingerprint.cc
diff --git a/components/autofill/content/browser/risk/fingerprint.cc b/components/autofill/content/browser/risk/fingerprint.cc
index c6f39560b61687cdb428d1ab7c4b581534301318..f60edfaff724e5a393b6832454e3256715e28c48 100644
--- a/components/autofill/content/browser/risk/fingerprint.cc
+++ b/components/autofill/content/browser/risk/fingerprint.cc
@@ -184,7 +184,7 @@ class FingerprintDataLoader : public content::GpuDataManagerObserver {
const std::string& app_locale,
const std::string& user_agent,
const base::TimeDelta& timeout,
- const base::Callback<void(scoped_ptr<Fingerprint>)>& callback);
+ const base::Callback<void(std::unique_ptr<Fingerprint>)>& callback);
private:
~FingerprintDataLoader() override {}
@@ -193,7 +193,7 @@ class FingerprintDataLoader : public content::GpuDataManagerObserver {
void OnGpuInfoUpdate() override;
// Callbacks for asynchronously loaded data.
- void OnGotFonts(scoped_ptr<base::ListValue> fonts);
+ void OnGotFonts(std::unique_ptr<base::ListValue> fonts);
void OnGotPlugins(const std::vector<content::WebPluginInfo>& plugins);
void OnGotGeoposition(const content::Geoposition& geoposition);
@@ -226,7 +226,7 @@ class FingerprintDataLoader : public content::GpuDataManagerObserver {
const base::Time install_time_;
// Data that will be loaded asynchronously.
- scoped_ptr<base::ListValue> fonts_;
+ std::unique_ptr<base::ListValue> fonts_;
std::vector<content::WebPluginInfo> plugins_;
bool waiting_on_plugins_;
content::Geoposition geoposition_;
@@ -236,10 +236,10 @@ class FingerprintDataLoader : public content::GpuDataManagerObserver {
base::OneShotTimer timeout_timer_;
// The callback that will be called once all the data is available.
- base::Callback<void(scoped_ptr<Fingerprint>)> callback_;
+ base::Callback<void(std::unique_ptr<Fingerprint>)> callback_;
// The callback used as an "observer" of the GeolocationProvider.
- scoped_ptr<content::GeolocationProvider::Subscription>
+ std::unique_ptr<content::GeolocationProvider::Subscription>
geolocation_subscription_;
// For invalidating asynchronous callbacks that might arrive after |this|
@@ -261,7 +261,7 @@ FingerprintDataLoader::FingerprintDataLoader(
const std::string& app_locale,
const std::string& user_agent,
const base::TimeDelta& timeout,
- const base::Callback<void(scoped_ptr<Fingerprint>)>& callback)
+ const base::Callback<void(std::unique_ptr<Fingerprint>)>& callback)
: gpu_data_manager_(content::GpuDataManager::GetInstance()),
gpu_observer_(this),
obfuscated_gaia_id_(obfuscated_gaia_id),
@@ -320,7 +320,7 @@ void FingerprintDataLoader::OnGpuInfoUpdate() {
MaybeFillFingerprint();
}
-void FingerprintDataLoader::OnGotFonts(scoped_ptr<base::ListValue> fonts) {
+void FingerprintDataLoader::OnGotFonts(std::unique_ptr<base::ListValue> fonts) {
DCHECK(!fonts_);
fonts_.reset(fonts.release());
MaybeFillFingerprint();
@@ -362,7 +362,7 @@ void FingerprintDataLoader::MaybeFillFingerprint() {
}
void FingerprintDataLoader::FillFingerprint() {
- scoped_ptr<Fingerprint> fingerprint(new Fingerprint);
+ std::unique_ptr<Fingerprint> fingerprint(new Fingerprint);
Fingerprint::MachineCharacteristics* machine =
fingerprint->mutable_machine_characteristics();
@@ -441,7 +441,7 @@ void GetFingerprintInternal(
const std::string& app_locale,
const std::string& user_agent,
const base::TimeDelta& timeout,
- const base::Callback<void(scoped_ptr<Fingerprint>)>& callback) {
+ const base::Callback<void(std::unique_ptr<Fingerprint>)>& callback) {
// Begin loading all of the data that we need to load asynchronously.
// This class is responsible for freeing its own memory.
new FingerprintDataLoader(obfuscated_gaia_id, window_bounds, content_bounds,
@@ -462,7 +462,7 @@ void GetFingerprint(
const base::Time& install_time,
const std::string& app_locale,
const std::string& user_agent,
- const base::Callback<void(scoped_ptr<Fingerprint>)>& callback) {
+ const base::Callback<void(std::unique_ptr<Fingerprint>)>& callback) {
gfx::Rect content_bounds = web_contents->GetContainerBounds();
blink::WebScreenInfo screen_info;

Powered by Google App Engine
This is Rietveld 408576698