Index: content/browser/payments/payment_app_context_impl.cc |
diff --git a/content/browser/payments/payment_app_context_impl.cc b/content/browser/payments/payment_app_context_impl.cc |
index 37a3fcbf4bdefeb7366d0a38c75f728eb33b4f10..eb5a9556667d237c234cd4b9596c4344d16d932e 100644 |
--- a/content/browser/payments/payment_app_context_impl.cc |
+++ b/content/browser/payments/payment_app_context_impl.cc |
@@ -9,7 +9,6 @@ |
#include "base/bind.h" |
#include "base/memory/ptr_util.h" |
#include "base/stl_util.h" |
-#include "content/browser/payments/payment_app_database.h" |
#include "content/browser/payments/payment_app_manager.h" |
#include "content/public/browser/browser_thread.h" |
@@ -64,7 +63,10 @@ PaymentAppDatabase* PaymentAppContextImpl::payment_app_database() const { |
void PaymentAppContextImpl::GetAllManifests( |
const GetAllManifestsCallback& callback) { |
- NOTIMPLEMENTED(); |
+ DCHECK_CURRENTLY_ON(BrowserThread::UI); |
+ BrowserThread::PostTask( |
+ BrowserThread::IO, FROM_HERE, |
+ base::Bind(&PaymentAppContextImpl::GetAllManifestsOnIO, this, callback)); |
} |
PaymentAppContextImpl::~PaymentAppContextImpl() { |
@@ -101,4 +103,21 @@ void PaymentAppContextImpl::DidShutdown() { |
is_shutdown_ = true; |
} |
+void PaymentAppContextImpl::GetAllManifestsOnIO( |
+ const GetAllManifestsCallback& callback) { |
+ DCHECK_CURRENTLY_ON(BrowserThread::IO); |
+ payment_app_database()->ReadAllManifests(base::Bind( |
+ &PaymentAppContextImpl::DidGetAllManifestsOnIO, this, callback)); |
+} |
+ |
+void PaymentAppContextImpl::DidGetAllManifestsOnIO( |
+ const GetAllManifestsCallback& callback, |
+ Manifests manifests) { |
+ DCHECK_CURRENTLY_ON(BrowserThread::IO); |
+ |
+ BrowserThread::PostTask( |
+ BrowserThread::UI, FROM_HERE, |
+ base::Bind(callback, base::Passed(std::move(manifests)))); |
+} |
+ |
} // namespace content |