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

Side by Side Diff: chrome/browser/payments/chrome_payment_request_delegate.cc

Issue 2772103002: [Payments] Desktop: never return false in incognito mode for canMakePayment (Closed)
Patch Set: Created 3 years, 9 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 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698