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

Unified Diff: components/webdata_services/web_data_service_wrapper.cc

Issue 2838433002: [Payments] Cache payment manifests. (Closed)
Patch Set: rebase Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/webdata_services/web_data_service_wrapper.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/webdata_services/web_data_service_wrapper.cc
diff --git a/components/webdata_services/web_data_service_wrapper.cc b/components/webdata_services/web_data_service_wrapper.cc
index f0c068a84c212397ac1239f16ece9ca5b8598c16..9d3e6e7b2f6d10434bab0efa3d320466a73ee861 100644
--- a/components/webdata_services/web_data_service_wrapper.cc
+++ b/components/webdata_services/web_data_service_wrapper.cc
@@ -32,6 +32,7 @@
#endif
#if defined(OS_ANDROID)
+#include "components/payments/android/payment_manifest_web_data_service.h"
#include "components/payments/android/payment_method_manifest_table.h"
#include "components/payments/android/web_app_manifest_section_table.h"
#endif
@@ -128,6 +129,13 @@ WebDataServiceWrapper::WebDataServiceWrapper(
password_web_data_->Init();
#endif
+#if defined(OS_ANDROID)
+ payment_manifest_web_data_ = new payments::PaymentManifestWebDataService(
+ web_database_,
+ base::Bind(show_error_callback, ERROR_LOADING_PAYMENT_MANIFEST),
+ ui_thread);
+#endif
+
autofill_web_data_->GetAutofillBackend(
base::Bind(&InitSyncableServicesOnDBThread, db_thread, flare,
autofill_web_data_, context_path, application_locale));
@@ -145,6 +153,10 @@ void WebDataServiceWrapper::Shutdown() {
password_web_data_->ShutdownOnUIThread();
#endif
+#if defined(OS_ANDROID)
+ payment_manifest_web_data_->ShutdownOnUIThread();
+#endif
+
web_database_->ShutdownDatabase();
}
@@ -168,3 +180,10 @@ WebDataServiceWrapper::GetPasswordWebData() {
return password_web_data_.get();
}
#endif
+
+#if defined(OS_ANDROID)
+scoped_refptr<payments::PaymentManifestWebDataService>
+WebDataServiceWrapper::GetPaymentManifestWebData() {
+ return payment_manifest_web_data_.get();
+}
+#endif
« no previous file with comments | « components/webdata_services/web_data_service_wrapper.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698