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

Unified Diff: content/browser/payments/payment_app_context.h

Issue 2497983002: PaymentApp: Implement PaymentAppManager.setManifest(). (Closed)
Patch Set: 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
Index: content/browser/payments/payment_app_context.h
diff --git a/content/browser/payments/payment_app_context.h b/content/browser/payments/payment_app_context.h
index 5ffa400fdc02c4e1dcfae812aca11754693f6c80..08ff3af29e950aa074ee26a5b9e89fc55b8431cb 100644
--- a/content/browser/payments/payment_app_context.h
+++ b/content/browser/payments/payment_app_context.h
@@ -21,11 +21,8 @@ class ServiceWorkerContextWrapper;
class CONTENT_EXPORT PaymentAppContext
: public base::RefCountedThreadSafe<PaymentAppContext> {
public:
- PaymentAppContext();
-
- // Init and Shutdown are for use on the UI thread when the
- // StoragePartition is being setup and torn down.
- void Init(scoped_refptr<ServiceWorkerContextWrapper> context);
+ PaymentAppContext(
nhiroki 2016/11/15 02:32:18 explicit
zino 2016/11/15 17:57:37 Done.
+ scoped_refptr<ServiceWorkerContextWrapper> service_worker_context);
// Shutdown must be called before deleting this. Call on the UI thread.
void Shutdown();
@@ -39,8 +36,11 @@ class CONTENT_EXPORT PaymentAppContext
// be deleted. Call on the IO thread.
void ServiceHadConnectionError(PaymentAppManager* service);
+ ServiceWorkerContextWrapper* service_worker_context() const;
+
protected:
friend class base::RefCountedThreadSafe<PaymentAppContext>;
+ friend class PaymentAppManagerTest;
virtual ~PaymentAppContext();
private:
@@ -49,6 +49,8 @@ class CONTENT_EXPORT PaymentAppContext
void ShutdownOnIO();
+ scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_;
+
// The services are owned by this. They're either deleted
// during ShutdownOnIO or when the channel is closed via
// ServiceHadConnectionError. Only accessed on the IO thread.

Powered by Google App Engine
This is Rietveld 408576698