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

Side by Side Diff: chrome/browser/ui/autofill/chrome_autofill_client.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "chrome/browser/ui/autofill/chrome_autofill_client.h" 5 #include "chrome/browser/ui/autofill/chrome_autofill_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/memory/ptr_util.h"
12 #include "build/build_config.h" 13 #include "build/build_config.h"
13 #include "chrome/browser/autofill/personal_data_manager_factory.h" 14 #include "chrome/browser/autofill/personal_data_manager_factory.h"
14 #include "chrome/browser/autofill/risk_util.h" 15 #include "chrome/browser/autofill/risk_util.h"
15 #include "chrome/browser/browser_process.h" 16 #include "chrome/browser/browser_process.h"
16 #include "chrome/browser/infobars/infobar_service.h" 17 #include "chrome/browser/infobars/infobar_service.h"
17 #include "chrome/browser/password_manager/chrome_password_manager_client.h" 18 #include "chrome/browser/password_manager/chrome_password_manager_client.h"
18 #include "chrome/browser/profiles/profile.h" 19 #include "chrome/browser/profiles/profile.h"
19 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 20 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
20 #include "chrome/browser/signin/signin_manager_factory.h" 21 #include "chrome/browser/signin/signin_manager_factory.h"
21 #include "chrome/browser/sync/profile_sync_service_factory.h" 22 #include "chrome/browser/sync/profile_sync_service_factory.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 169
169 void ChromeAutofillClient::OnUnmaskVerificationResult( 170 void ChromeAutofillClient::OnUnmaskVerificationResult(
170 PaymentsRpcResult result) { 171 PaymentsRpcResult result) {
171 unmask_controller_.OnVerificationResult(result); 172 unmask_controller_.OnVerificationResult(result);
172 } 173 }
173 174
174 void ChromeAutofillClient::ConfirmSaveCreditCardLocally( 175 void ChromeAutofillClient::ConfirmSaveCreditCardLocally(
175 const CreditCard& card, 176 const CreditCard& card,
176 const base::Closure& callback) { 177 const base::Closure& callback) {
177 #if defined(OS_ANDROID) 178 #if defined(OS_ANDROID)
178 InfoBarService::FromWebContents(web_contents())->AddInfoBar( 179 InfoBarService::FromWebContents(web_contents())
179 CreateSaveCardInfoBarMobile( 180 ->AddInfoBar(CreateSaveCardInfoBarMobile(
180 make_scoped_ptr(new AutofillSaveCardInfoBarDelegateMobile( 181 base::WrapUnique(new AutofillSaveCardInfoBarDelegateMobile(
181 false, card, scoped_ptr<base::DictionaryValue>(nullptr), 182 false, card, std::unique_ptr<base::DictionaryValue>(nullptr),
182 callback)))); 183 callback))));
183 #else 184 #else
184 // Do lazy initialization of SaveCardBubbleControllerImpl. 185 // Do lazy initialization of SaveCardBubbleControllerImpl.
185 autofill::SaveCardBubbleControllerImpl::CreateForWebContents( 186 autofill::SaveCardBubbleControllerImpl::CreateForWebContents(
186 web_contents()); 187 web_contents());
187 autofill::SaveCardBubbleControllerImpl* controller = 188 autofill::SaveCardBubbleControllerImpl* controller =
188 autofill::SaveCardBubbleControllerImpl::FromWebContents(web_contents()); 189 autofill::SaveCardBubbleControllerImpl::FromWebContents(web_contents());
189 controller->ShowBubbleForLocalSave(card, callback); 190 controller->ShowBubbleForLocalSave(card, callback);
190 #endif 191 #endif
191 } 192 }
192 193
193 void ChromeAutofillClient::ConfirmSaveCreditCardToCloud( 194 void ChromeAutofillClient::ConfirmSaveCreditCardToCloud(
194 const CreditCard& card, 195 const CreditCard& card,
195 scoped_ptr<base::DictionaryValue> legal_message, 196 std::unique_ptr<base::DictionaryValue> legal_message,
196 const base::Closure& callback) { 197 const base::Closure& callback) {
197 #if defined(OS_ANDROID) 198 #if defined(OS_ANDROID)
198 InfoBarService::FromWebContents(web_contents())->AddInfoBar( 199 InfoBarService::FromWebContents(web_contents())
199 CreateSaveCardInfoBarMobile( 200 ->AddInfoBar(CreateSaveCardInfoBarMobile(
200 make_scoped_ptr(new AutofillSaveCardInfoBarDelegateMobile( 201 base::WrapUnique(new AutofillSaveCardInfoBarDelegateMobile(
201 true, card, std::move(legal_message), callback)))); 202 true, card, std::move(legal_message), callback))));
202 #else 203 #else
203 // Do lazy initialization of SaveCardBubbleControllerImpl. 204 // Do lazy initialization of SaveCardBubbleControllerImpl.
204 autofill::SaveCardBubbleControllerImpl::CreateForWebContents(web_contents()); 205 autofill::SaveCardBubbleControllerImpl::CreateForWebContents(web_contents());
205 autofill::SaveCardBubbleControllerImpl* controller = 206 autofill::SaveCardBubbleControllerImpl* controller =
206 autofill::SaveCardBubbleControllerImpl::FromWebContents(web_contents()); 207 autofill::SaveCardBubbleControllerImpl::FromWebContents(web_contents());
207 controller->ShowBubbleForUpload(card, std::move(legal_message), callback); 208 controller->ShowBubbleForUpload(card, std::move(legal_message), callback);
208 #endif 209 #endif
209 } 210 }
210 211
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 362
362 ssl_status = navigation_entry->GetSSL(); 363 ssl_status = navigation_entry->GetSSL();
363 // Note: If changing the implementation below, also change 364 // Note: If changing the implementation below, also change
364 // AwAutofillClient::IsContextSecure. See crbug.com/505388 365 // AwAutofillClient::IsContextSecure. See crbug.com/505388
365 return ssl_status.security_style == content::SECURITY_STYLE_AUTHENTICATED && 366 return ssl_status.security_style == content::SECURITY_STYLE_AUTHENTICATED &&
366 !(ssl_status.content_status & 367 !(ssl_status.content_status &
367 content::SSLStatus::RAN_INSECURE_CONTENT); 368 content::SSLStatus::RAN_INSECURE_CONTENT);
368 } 369 }
369 370
370 } // namespace autofill 371 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/chrome_autofill_client.h ('k') | chrome/browser/ui/autofill/country_combobox_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698