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

Unified Diff: content/browser/service_worker/service_worker_info.cc

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_info.cc
diff --git a/content/browser/service_worker/service_worker_info.cc b/content/browser/service_worker/service_worker_info.cc
index 8ba8ac2b2f39c80325122a3502ccf803bf2c10ce..ba62c7ea51a478d19d41c9821f00ea98dbf1b0ea 100644
--- a/content/browser/service_worker/service_worker_info.cc
+++ b/content/browser/service_worker/service_worker_info.cc
@@ -6,6 +6,7 @@
#include "content/browser/service_worker/embedded_worker_status.h"
#include "content/common/service_worker/service_worker_types.h"
+#include "content/public/common/browser_side_navigation_policy.h"
#include "content/public/common/child_process_host.h"
#include "ipc/ipc_message.h"
@@ -14,13 +15,21 @@ namespace content {
ServiceWorkerVersionInfo::ClientInfo::ClientInfo()
: ClientInfo(ChildProcessHost::kInvalidUniqueID,
MSG_ROUTING_NONE,
+ base::Callback<WebContents*(void)>(),
SERVICE_WORKER_PROVIDER_UNKNOWN) {}
-ServiceWorkerVersionInfo::ClientInfo::ClientInfo(int process_id,
- int route_id,
- ServiceWorkerProviderType type)
- : process_id(process_id), route_id(route_id), type(type) {
-}
+ServiceWorkerVersionInfo::ClientInfo::ClientInfo(
+ int process_id,
+ int route_id,
+ const base::Callback<WebContents*(void)>& web_contents_getter,
+ ServiceWorkerProviderType type)
+ : process_id(process_id),
+ route_id(route_id),
+ web_contents_getter(web_contents_getter),
+ type(type) {}
+
+ServiceWorkerVersionInfo::ClientInfo::ClientInfo(
+ const ServiceWorkerVersionInfo::ClientInfo& other) = default;
ServiceWorkerVersionInfo::ClientInfo::~ClientInfo() {
}
« no previous file with comments | « content/browser/service_worker/service_worker_info.h ('k') | content/browser/service_worker/service_worker_version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698