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

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

Issue 2917643002: PlzNavigate: Fix ServiceWorkerHandler not finding WebContents. (Closed)
Patch Set: Shorter comment. Created 3 years, 7 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_observer.h
diff --git a/content/browser/service_worker/service_worker_context_observer.h b/content/browser/service_worker/service_worker_context_observer.h
index 65361d7d7a3a3744d97bf11bdcac26ac914df107..d0564d449fec5444a19a1fc0b78efdb87f842632 100644
--- a/content/browser/service_worker/service_worker_context_observer.h
+++ b/content/browser/service_worker/service_worker_context_observer.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include "base/callback.h"
#include "base/strings/string16.h"
#include "base/time/time.h"
#include "content/browser/service_worker/service_worker_info.h"
@@ -72,11 +73,14 @@ class ServiceWorkerContextObserver {
int process_id,
int thread_id,
const ConsoleMessage& message) {}
- virtual void OnControlleeAdded(int64_t version_id,
- const std::string& uuid,
- int process_id,
- int route_id,
- ServiceWorkerProviderType type) {}
+ // |web_contents_getter| is only set in PlzNavigate.
+ virtual void OnControlleeAdded(
+ int64_t version_id,
+ const std::string& uuid,
+ int process_id,
+ int route_id,
+ const base::Callback<WebContents*(void)>& web_contents_getter,
+ ServiceWorkerProviderType type) {}
virtual void OnControlleeRemoved(int64_t version_id,
const std::string& uuid) {}
virtual void OnRegistrationStored(int64_t registration_id,

Powered by Google App Engine
This is Rietveld 408576698