| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/payments/chrome_payment_request_delegate.h" | 5 #include "chrome/browser/payments/chrome_payment_request_delegate.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 8 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 autofill::PersonalDataManager* | 34 autofill::PersonalDataManager* |
| 35 ChromePaymentRequestDelegate::GetPersonalDataManager() { | 35 ChromePaymentRequestDelegate::GetPersonalDataManager() { |
| 36 return autofill::PersonalDataManagerFactory::GetForProfile( | 36 return autofill::PersonalDataManagerFactory::GetForProfile( |
| 37 Profile::FromBrowserContext(web_contents_->GetBrowserContext())); | 37 Profile::FromBrowserContext(web_contents_->GetBrowserContext())); |
| 38 } | 38 } |
| 39 | 39 |
| 40 const std::string& ChromePaymentRequestDelegate::GetApplicationLocale() const { | 40 const std::string& ChromePaymentRequestDelegate::GetApplicationLocale() const { |
| 41 return g_browser_process->GetApplicationLocale(); | 41 return g_browser_process->GetApplicationLocale(); |
| 42 } | 42 } |
| 43 | 43 |
| 44 bool ChromePaymentRequestDelegate::IsIncognito() const { |
| 45 Profile* profile = |
| 46 Profile::FromBrowserContext(web_contents_->GetBrowserContext()); |
| 47 return profile && profile->GetProfileType() == Profile::INCOGNITO_PROFILE; |
| 48 } |
| 49 |
| 44 } // namespace payments | 50 } // namespace payments |
| OLD | NEW |