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

Unified Diff: third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp

Issue 2497983002: PaymentApp: Implement PaymentAppManager.setManifest(). (Closed)
Patch Set: rebase Created 4 years, 1 month 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 | « third_party/WebKit/LayoutTests/http/tests/payments/payment-app-manager.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp
diff --git a/third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp b/third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp
index 2ca6830c43ec8116ce190fa351b85eaf7e76e27b..d75482de914574dc476b13b81807800c0f38bfd8 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp
@@ -90,12 +90,21 @@ void PaymentAppManager::onSetManifest(
payments::mojom::blink::PaymentAppManifestError error) {
DCHECK(resolver);
switch (error) {
+ case payments::mojom::blink::PaymentAppManifestError::NONE:
+ resolver->resolve();
+ break;
case payments::mojom::blink::PaymentAppManifestError::NOT_IMPLEMENTED:
resolver->reject(
DOMException::create(NotSupportedError, "Not implemented yet."));
break;
- default:
- NOTREACHED();
+ case payments::mojom::blink::PaymentAppManifestError::NO_ACTIVE_WORKER:
+ resolver->reject(
+ DOMException::create(InvalidStateError, "No active service worker."));
+ break;
+ case payments::mojom::blink::PaymentAppManifestError::STORE_MANIFEST_FAILED:
+ resolver->reject(DOMException::create(
+ InvalidStateError, "Storing manifest data is failed."));
+ break;
}
}
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/payments/payment-app-manager.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698