| OLD | NEW |
| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 10 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 154 |
| 155 void ChromeAutofillClient::ConfirmSaveCreditCard( | 155 void ChromeAutofillClient::ConfirmSaveCreditCard( |
| 156 const base::Closure& save_card_callback) { | 156 const base::Closure& save_card_callback) { |
| 157 // TODO(bondd): Implement save card bubble for OS_MACOSX. | 157 // TODO(bondd): Implement save card bubble for OS_MACOSX. |
| 158 #if defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX) | 158 #if defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX) |
| 159 // Do lazy initialization of SaveCardBubbleControllerImpl. | 159 // Do lazy initialization of SaveCardBubbleControllerImpl. |
| 160 autofill::SaveCardBubbleControllerImpl::CreateForWebContents(web_contents()); | 160 autofill::SaveCardBubbleControllerImpl::CreateForWebContents(web_contents()); |
| 161 autofill::SaveCardBubbleControllerImpl* controller = | 161 autofill::SaveCardBubbleControllerImpl* controller = |
| 162 autofill::SaveCardBubbleControllerImpl::FromWebContents(web_contents()); | 162 autofill::SaveCardBubbleControllerImpl::FromWebContents(web_contents()); |
| 163 controller->SetCallback(save_card_callback); | 163 controller->SetCallback(save_card_callback); |
| 164 controller->ShowBubble(); | 164 controller->ShowBubble(false); |
| 165 #else | 165 #else |
| 166 AutofillCCInfoBarDelegate::Create( | 166 AutofillCCInfoBarDelegate::Create( |
| 167 InfoBarService::FromWebContents(web_contents()), this, | 167 InfoBarService::FromWebContents(web_contents()), this, |
| 168 save_card_callback); | 168 save_card_callback); |
| 169 #endif | 169 #endif |
| 170 } | 170 } |
| 171 | 171 |
| 172 bool ChromeAutofillClient::HasCreditCardScanFeature() { | 172 bool ChromeAutofillClient::HasCreditCardScanFeature() { |
| 173 return CreditCardScannerController::HasCreditCardScanFeature(); | 173 return CreditCardScannerController::HasCreditCardScanFeature(); |
| 174 } | 174 } |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 | 316 |
| 317 ssl_status = navigation_entry->GetSSL(); | 317 ssl_status = navigation_entry->GetSSL(); |
| 318 // Note: If changing the implementation below, also change | 318 // Note: If changing the implementation below, also change |
| 319 // AwAutofillClient::IsContextSecure. See crbug.com/505388 | 319 // AwAutofillClient::IsContextSecure. See crbug.com/505388 |
| 320 return ssl_status.security_style == | 320 return ssl_status.security_style == |
| 321 content::SECURITY_STYLE_AUTHENTICATED && | 321 content::SECURITY_STYLE_AUTHENTICATED && |
| 322 ssl_status.content_status == content::SSLStatus::NORMAL_CONTENT; | 322 ssl_status.content_status == content::SSLStatus::NORMAL_CONTENT; |
| 323 } | 323 } |
| 324 | 324 |
| 325 } // namespace autofill | 325 } // namespace autofill |
| OLD | NEW |