Commit 6863233e authored by Patrick Monette's avatar Patrick Monette Committed by Commit Bot

ServiceWorkerClientInfo: Remove default constructor.

Change-Id: Ic55588e09beac784d98dc40938dc911be466b42e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2151246
Commit-Queue: Patrick Monette <pmonette@chromium.org>
Reviewed-by: default avatarHiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#762114}
parent b6c802fa
...@@ -4,18 +4,8 @@ ...@@ -4,18 +4,8 @@
#include "content/browser/service_worker/service_worker_client_info.h" #include "content/browser/service_worker/service_worker_client_info.h"
#include "content/public/common/child_process_host.h"
#include "ipc/ipc_message.h"
namespace content { namespace content {
ServiceWorkerClientInfo::ServiceWorkerClientInfo()
: ServiceWorkerClientInfo(
ChildProcessHost::kInvalidUniqueID,
MSG_ROUTING_NONE,
base::RepeatingCallback<WebContents*(void)>(),
blink::mojom::ServiceWorkerContainerType::kUnknown) {}
ServiceWorkerClientInfo::ServiceWorkerClientInfo( ServiceWorkerClientInfo::ServiceWorkerClientInfo(
int process_id, int process_id,
int route_id, int route_id,
...@@ -24,11 +14,13 @@ ServiceWorkerClientInfo::ServiceWorkerClientInfo( ...@@ -24,11 +14,13 @@ ServiceWorkerClientInfo::ServiceWorkerClientInfo(
: process_id(process_id), : process_id(process_id),
route_id(route_id), route_id(route_id),
web_contents_getter(web_contents_getter), web_contents_getter(web_contents_getter),
type(type) {} type(type) {
DCHECK_NE(type, blink::mojom::ServiceWorkerContainerType::kUnknown);
}
ServiceWorkerClientInfo::ServiceWorkerClientInfo( ServiceWorkerClientInfo::ServiceWorkerClientInfo(
const ServiceWorkerClientInfo& other) = default; const ServiceWorkerClientInfo& other) = default;
ServiceWorkerClientInfo::~ServiceWorkerClientInfo() {} ServiceWorkerClientInfo::~ServiceWorkerClientInfo() = default;
} // namespace content } // namespace content
...@@ -15,7 +15,6 @@ namespace content { ...@@ -15,7 +15,6 @@ namespace content {
// Holds information about a single service worker client: // Holds information about a single service worker client:
// https://w3c.github.io/ServiceWorker/#client // https://w3c.github.io/ServiceWorker/#client
struct CONTENT_EXPORT ServiceWorkerClientInfo { struct CONTENT_EXPORT ServiceWorkerClientInfo {
ServiceWorkerClientInfo();
ServiceWorkerClientInfo( ServiceWorkerClientInfo(
int process_id, int process_id,
int route_id, int route_id,
......
...@@ -347,7 +347,10 @@ void ServiceWorkerContextWatcher::OnControlleeAdded( ...@@ -347,7 +347,10 @@ void ServiceWorkerContextWatcher::OnControlleeAdded(
if (it == version_info_map_.end()) if (it == version_info_map_.end())
return; return;
ServiceWorkerVersionInfo* version = it->second.get(); ServiceWorkerVersionInfo* version = it->second.get();
version->clients[uuid] = info;
bool inserted = version->clients.emplace(uuid, info).second;
DCHECK(inserted);
SendVersionInfo(*version); SendVersionInfo(*version);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment