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

Side by Side Diff: ios/chrome/browser/ui/autofill/autofill_client_ios.mm

Issue 2256193002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/chrome/browser/ui/autofill/autofill_client_ios.h" 5 #import "ios/chrome/browser/ui/autofill/autofill_client_ios.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 void AutofillClientIOS::ConfirmSaveCreditCardLocally( 91 void AutofillClientIOS::ConfirmSaveCreditCardLocally(
92 const CreditCard& card, 92 const CreditCard& card,
93 const base::Closure& callback) { 93 const base::Closure& callback) {
94 // This method is invoked synchronously from 94 // This method is invoked synchronously from
95 // AutofillManager::OnFormSubmitted(); at the time of detecting that a form 95 // AutofillManager::OnFormSubmitted(); at the time of detecting that a form
96 // was submitted, the WebContents is guaranteed to be live. Since the 96 // was submitted, the WebContents is guaranteed to be live. Since the
97 // InfoBarService is a WebContentsUserData, it must also be alive at this 97 // InfoBarService is a WebContentsUserData, it must also be alive at this
98 // time. 98 // time.
99 infobar_manager_->AddInfoBar(CreateSaveCardInfoBarMobile( 99 infobar_manager_->AddInfoBar(CreateSaveCardInfoBarMobile(
100 base::WrapUnique(new AutofillSaveCardInfoBarDelegateMobile( 100 base::MakeUnique<AutofillSaveCardInfoBarDelegateMobile>(
101 false, card, std::unique_ptr<base::DictionaryValue>(nullptr), 101 false, card, std::unique_ptr<base::DictionaryValue>(nullptr),
102 callback)))); 102 callback)));
103 } 103 }
104 104
105 void AutofillClientIOS::ConfirmSaveCreditCardToCloud( 105 void AutofillClientIOS::ConfirmSaveCreditCardToCloud(
106 const CreditCard& card, 106 const CreditCard& card,
107 std::unique_ptr<base::DictionaryValue> legal_message, 107 std::unique_ptr<base::DictionaryValue> legal_message,
108 const base::Closure& callback) { 108 const base::Closure& callback) {
109 infobar_manager_->AddInfoBar(CreateSaveCardInfoBarMobile( 109 infobar_manager_->AddInfoBar(CreateSaveCardInfoBarMobile(
110 base::WrapUnique(new AutofillSaveCardInfoBarDelegateMobile( 110 base::MakeUnique<AutofillSaveCardInfoBarDelegateMobile>(
111 true, card, std::move(legal_message), callback)))); 111 true, card, std::move(legal_message), callback)));
112 } 112 }
113 113
114 void AutofillClientIOS::ConfirmCreditCardFillAssist( 114 void AutofillClientIOS::ConfirmCreditCardFillAssist(
115 const CreditCard& card, 115 const CreditCard& card,
116 const base::Closure& callback) { 116 const base::Closure& callback) {
117 auto infobar_delegate = 117 auto infobar_delegate =
118 base::MakeUnique<AutofillCreditCardFillingInfoBarDelegateMobile>( 118 base::MakeUnique<AutofillCreditCardFillingInfoBarDelegateMobile>(
119 card, callback); 119 card, callback);
120 auto* raw_delegate = infobar_delegate.get(); 120 auto* raw_delegate = infobar_delegate.get();
121 if (infobar_manager_->AddInfoBar( 121 if (infobar_manager_->AddInfoBar(
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 192
193 bool AutofillClientIOS::ShouldShowSigninPromo() { 193 bool AutofillClientIOS::ShouldShowSigninPromo() {
194 return false; 194 return false;
195 } 195 }
196 196
197 void AutofillClientIOS::StartSigninFlow() { 197 void AutofillClientIOS::StartSigninFlow() {
198 NOTIMPLEMENTED(); 198 NOTIMPLEMENTED();
199 } 199 }
200 200
201 } // namespace autofill 201 } // namespace autofill
OLDNEW
« no previous file with comments | « ios/chrome/browser/translate/translate_accept_languages_factory.cc ('k') | ios/chrome/browser/web_data_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698