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

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

Issue 2891903002: ServiceWorker: Keep info as a member of ServiceWorkerProviderHost (Closed)
Patch Set: Rebased 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
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_provider_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_provider_host.h
diff --git a/content/browser/service_worker/service_worker_provider_host.h b/content/browser/service_worker/service_worker_provider_host.h
index 8c074f0ffb332828a7c27462a963ad5bb61c7bce..8d5fee4ae4ce73d8e25dbf95a8821f8d689d734c 100644
--- a/content/browser/service_worker/service_worker_provider_host.h
+++ b/content/browser/service_worker/service_worker_provider_host.h
@@ -88,14 +88,14 @@ class CONTENT_EXPORT ServiceWorkerProviderHost
const std::string& client_uuid() const { return client_uuid_; }
int process_id() const { return render_process_id_; }
- int provider_id() const { return provider_id_; }
+ int provider_id() const { return info_.provider_id; }
int frame_id() const;
- int route_id() const { return route_id_; }
+ int route_id() const { return info_.route_id; }
const WebContentsGetter& web_contents_getter() const {
return web_contents_getter_;
}
- bool is_parent_frame_secure() const { return is_parent_frame_secure_; }
+ bool is_parent_frame_secure() const { return info_.is_parent_frame_secure; }
// Returns whether this provider host is secure enough to have a service
// worker controller.
@@ -157,7 +157,7 @@ class CONTENT_EXPORT ServiceWorkerProviderHost
ServiceWorkerVersion* running_hosted_version() const {
// Only providers for controllers can host a running version.
DCHECK(!running_hosted_version_ ||
- provider_type_ == SERVICE_WORKER_PROVIDER_FOR_CONTROLLER);
+ info_.type == SERVICE_WORKER_PROVIDER_FOR_CONTROLLER);
return running_hosted_version_.get();
}
@@ -170,7 +170,7 @@ class CONTENT_EXPORT ServiceWorkerProviderHost
void SetTopmostFrameUrl(const GURL& url);
const GURL& topmost_frame_url() const { return topmost_frame_url_; }
- ServiceWorkerProviderType provider_type() const { return provider_type_; }
+ ServiceWorkerProviderType provider_type() const { return info_.type; }
bool IsProviderForClient() const;
blink::WebServiceWorkerClientType client_type() const;
@@ -319,10 +319,7 @@ class CONTENT_EXPORT ServiceWorkerProviderHost
};
ServiceWorkerProviderHost(int render_process_id,
- int route_id,
- int provider_id,
- ServiceWorkerProviderType provider_type,
- bool is_parent_frame_secure,
+ ServiceWorkerProviderHostInfo info,
base::WeakPtr<ServiceWorkerContextCore> context,
ServiceWorkerDispatcherHost* dispatcher_host);
@@ -371,25 +368,20 @@ class CONTENT_EXPORT ServiceWorkerProviderHost
std::string client_uuid_;
int render_process_id_;
- // See the constructor's documentation.
- int route_id_;
-
// For provider hosts that are hosting a running service worker, the id of the
// service worker thread. Otherwise, |kDocumentMainThreadId|. May be
// |kInvalidEmbeddedWorkerThreadId| before the hosted service worker starts
// up, or during cross-site transfers.
int render_thread_id_;
- // Unique within the renderer process.
- int provider_id_;
+ // Keeps the basic provider's info provided from the renderer side.
+ ServiceWorkerProviderHostInfo info_;
// PlzNavigate
// Only set when this object is pre-created for a navigation. It indicates the
// tab where the navigation occurs.
WebContentsGetter web_contents_getter_;
- ServiceWorkerProviderType provider_type_;
- const bool is_parent_frame_secure_;
GURL document_url_;
GURL topmost_frame_url_;
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_provider_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698