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

Unified Diff: chrome/browser/ui/passwords/password_manager_presenter.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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: chrome/browser/ui/passwords/password_manager_presenter.cc
diff --git a/chrome/browser/ui/passwords/password_manager_presenter.cc b/chrome/browser/ui/passwords/password_manager_presenter.cc
index 9848e82e881826e9a4bf980d4fdd0f93d99842b7..4710a7ef76fa468049a4819139bc70e797ab9c4e 100644
--- a/chrome/browser/ui/passwords/password_manager_presenter.cc
+++ b/chrome/browser/ui/passwords/password_manager_presenter.cc
@@ -293,10 +293,11 @@ void PasswordManagerPresenter::SetPasswordExceptionList() {
}
void PasswordManagerPresenter::SortEntriesAndHideDuplicates(
- std::vector<scoped_ptr<autofill::PasswordForm>>* list,
+ std::vector<std::unique_ptr<autofill::PasswordForm>>* list,
DuplicatesMap* duplicates,
bool username_and_password_in_key) {
- std::vector<std::pair<std::string, scoped_ptr<autofill::PasswordForm>>> pairs;
+ std::vector<std::pair<std::string, std::unique_ptr<autofill::PasswordForm>>>
+ pairs;
pairs.reserve(list->size());
for (auto& form : *list) {
pairs.push_back(std::make_pair(
@@ -305,8 +306,9 @@ void PasswordManagerPresenter::SortEntriesAndHideDuplicates(
std::sort(
pairs.begin(), pairs.end(),
- [](const std::pair<std::string, scoped_ptr<autofill::PasswordForm>>& left,
- const std::pair<std::string, scoped_ptr<autofill::PasswordForm>>&
+ [](const std::pair<std::string, std::unique_ptr<autofill::PasswordForm>>&
+ left,
+ const std::pair<std::string, std::unique_ptr<autofill::PasswordForm>>&
right) { return left.first < right.first; });
list->clear();

Powered by Google App Engine
This is Rietveld 408576698