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

Unified Diff: content/browser/service_worker/service_worker_context_wrapper.h

Issue 2610163002: PaymentApp: Implement InvokePaymentApp() in browser side. (Closed)
Patch Set: nhiroki's comments Created 3 years, 11 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: content/browser/service_worker/service_worker_context_wrapper.h
diff --git a/content/browser/service_worker/service_worker_context_wrapper.h b/content/browser/service_worker/service_worker_context_wrapper.h
index cadaaada440c9c5049d60d9aeccf3319ece2c153..04001b9c0f19dd24b2748eabf23fe61d4aedce06 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.h
+++ b/content/browser/service_worker/service_worker_context_wrapper.h
@@ -174,6 +174,24 @@ class CONTENT_EXPORT ServiceWorkerContextWrapper
const GURL& origin,
const FindRegistrationCallback& callback);
+ // Returns the registration for |registration_id|. It is guaranteed that the
+ // returned registration has the activated worker.
+ //
+ // Generally |FindReadyRegistrationForId| should be used to look up a
+ // registration by |registration_id| since it's more efficient. But if a
+ // |registration_id| is all that is available this method can be used instead.
+ //
+ // - If the registration is not found, returns ERROR_NOT_FOUND.
+ // - If the registration has neither the waiting version nor the active
+ // version, returns ERROR_NOT_FOUND.
+ // - If the registration does not have the active version but has the waiting
+ // version, activates the waiting version and runs |callback| when it is
+ // activated.
+ //
+ // Must be called from the IO thread.
+ void FindReadyRegistrationForIdOnly(int64_t registration_id,
+ const FindRegistrationCallback& callback);
+
// All these methods must be called from the IO thread.
void GetAllRegistrations(const GetRegistrationsInfosCallback& callback);
void GetRegistrationUserData(int64_t registration_id,

Powered by Google App Engine
This is Rietveld 408576698