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

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

Issue 852463002: Keep track of ServiceWorkerContext's BrowserContext and expose it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nullptr
Patch Set: Created 5 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 56367eee1cebbe645a0e4dc537f57aa68eec1d45..af1ebb200fb506a7844e04bd0998ed8250623517 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.h
+++ b/content/browser/service_worker/service_worker_context_wrapper.h
@@ -88,6 +88,7 @@ class CONTENT_EXPORT ServiceWorkerContextWrapper
void RemoveObserver(ServiceWorkerContextObserver* observer);
bool is_incognito() const { return is_incognito_; }
+ BrowserContext* browser_context() const { return browser_context_; }
michaeln 2015/01/12 20:19:13 Ah... I see why you're wanting to add this, to tra
// The URLRequestContext doesn't exist until after the StoragePartition is
// made (which is after this object is made). This function must be called
@@ -130,6 +131,9 @@ class CONTENT_EXPORT ServiceWorkerContextWrapper
// Initialized in Init(); true if the user data directory is empty.
bool is_incognito_;
+
+ // BrowserContext associated with the instance. Can be null during shutdown.
michaeln 2015/01/12 20:19:13 where does it get set to nullptr?
+ BrowserContext* browser_context_;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698