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

Unified Diff: chrome/browser/safe_browsing/incident_reporting/preference_validation_delegate.cc

Issue 1551503002: Convert Pass()→std::move() in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: chrome/browser/safe_browsing/incident_reporting/preference_validation_delegate.cc
diff --git a/chrome/browser/safe_browsing/incident_reporting/preference_validation_delegate.cc b/chrome/browser/safe_browsing/incident_reporting/preference_validation_delegate.cc
index 1f71f407f4a48aa2636ed6ee99423110b4e3d311..24cb6a1830ac18c3a576af859d9ff2f509accd42 100644
--- a/chrome/browser/safe_browsing/incident_reporting/preference_validation_delegate.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/preference_validation_delegate.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/safe_browsing/incident_reporting/preference_validation_delegate.h"
#include <string>
+#include <utility>
#include <vector>
#include "base/json/json_writer.h"
@@ -43,9 +44,7 @@ TPIncident_ValueState MapValueState(
PreferenceValidationDelegate::PreferenceValidationDelegate(
Profile* profile,
scoped_ptr<IncidentReceiver> incident_receiver)
- : profile_(profile),
- incident_receiver_(incident_receiver.Pass()) {
-}
+ : profile_(profile), incident_receiver_(std::move(incident_receiver)) {}
PreferenceValidationDelegate::~PreferenceValidationDelegate() {
}
@@ -67,8 +66,8 @@ void PreferenceValidationDelegate::OnAtomicPreferenceValidation(
}
incident->set_value_state(proto_value_state);
incident_receiver_->AddIncidentForProfile(
- profile_, make_scoped_ptr(new TrackedPreferenceIncident(incident.Pass(),
- is_personal)));
+ profile_, make_scoped_ptr(new TrackedPreferenceIncident(
+ std::move(incident), is_personal)));
}
}
@@ -91,8 +90,8 @@ void PreferenceValidationDelegate::OnSplitPreferenceValidation(
}
incident->set_value_state(proto_value_state);
incident_receiver_->AddIncidentForProfile(
- profile_, make_scoped_ptr(new TrackedPreferenceIncident(incident.Pass(),
- is_personal)));
+ profile_, make_scoped_ptr(new TrackedPreferenceIncident(
+ std::move(incident), is_personal)));
}
}

Powered by Google App Engine
This is Rietveld 408576698