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

Unified Diff: ios/chrome/browser/passwords/password_controller.mm

Issue 2900693002: [Password Manager] Convert |pending_login_managers_| to an array of scoped_refptr (Closed)
Patch Set: Rebase Created 3 years, 7 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
« no previous file with comments | « ios/chrome/browser/passwords/ios_chrome_update_password_infobar_delegate.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/passwords/password_controller.mm
diff --git a/ios/chrome/browser/passwords/password_controller.mm b/ios/chrome/browser/passwords/password_controller.mm
index 2545cb32daa4731de8d79738b855fadfcc8b7946..608285e5f69d9b3469a226d665705d7717d6bfdd 100644
--- a/ios/chrome/browser/passwords/password_controller.mm
+++ b/ios/chrome/browser/passwords/password_controller.mm
@@ -18,6 +18,7 @@
#include "base/mac/foundation_util.h"
#include "base/mac/scoped_nsobject.h"
#include "base/memory/ptr_util.h"
+#include "base/memory/ref_counted.h"
#include "base/strings/string16.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
@@ -118,7 +119,7 @@ enum class PasswordInfoBarType { SAVE, UPDATE };
// Displays infobar for |form| with |type|. If |type| is UPDATE, the user
// is prompted to update the password. If |type| is SAVE, the user is prompted
// to save the password.
-- (void)showInfoBarForForm:(std::unique_ptr<PasswordFormManager>)form
+- (void)showInfoBarForForm:(scoped_refptr<PasswordFormManager>)form
infoBarType:(PasswordInfoBarType)type;
@end
@@ -642,14 +643,13 @@ bool GetPageURLAndCheckTrustLevel(web::WebState* web_state, GURL* page_url) {
#pragma mark - PasswordManagerClientDelegate
-- (void)showSavePasswordInfoBar:
- (std::unique_ptr<PasswordFormManager>)formToSave {
+- (void)showSavePasswordInfoBar:(scoped_refptr<PasswordFormManager>)formToSave {
[self showInfoBarForForm:std::move(formToSave)
infoBarType:PasswordInfoBarType::SAVE];
}
- (void)showUpdatePasswordInfoBar:
- (std::unique_ptr<PasswordFormManager>)formToUpdate {
+ (scoped_refptr<PasswordFormManager>)formToUpdate {
[self showInfoBarForForm:std::move(formToUpdate)
infoBarType:PasswordInfoBarType::UPDATE];
}
@@ -852,7 +852,7 @@ bool GetPageURLAndCheckTrustLevel(web::WebState* web_state, GURL* page_url) {
#pragma mark - Private methods
-- (void)showInfoBarForForm:(std::unique_ptr<PasswordFormManager>)form
+- (void)showInfoBarForForm:(scoped_refptr<PasswordFormManager>)form
infoBarType:(PasswordInfoBarType)type {
if (!webStateObserverBridge_ || !webStateObserverBridge_->web_state())
return;
« no previous file with comments | « ios/chrome/browser/passwords/ios_chrome_update_password_infobar_delegate.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698