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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/payments/chrome_payment_request_delegate.cc
diff --git a/chrome/browser/payments/chrome_payment_request_delegate.cc b/chrome/browser/payments/chrome_payment_request_delegate.cc
index 7b228b62ad454ad055b80c06275f99d5162df4e4..72544464f1ad755fad9826034499e9cde167a7d4 100644
--- a/chrome/browser/payments/chrome_payment_request_delegate.cc
+++ b/chrome/browser/payments/chrome_payment_request_delegate.cc
@@ -41,4 +41,10 @@ const std::string& ChromePaymentRequestDelegate::GetApplicationLocale() const {
return g_browser_process->GetApplicationLocale();
}
+bool ChromePaymentRequestDelegate::IsIncognito() const {
+ Profile* profile =
+ Profile::FromBrowserContext(web_contents_->GetBrowserContext());
+ return profile && profile->GetProfileType() == Profile::INCOGNITO_PROFILE;
+}
+
} // namespace payments

Powered by Google App Engine
This is Rietveld 408576698