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

Unified Diff: content/common/service_worker/service_worker_utils.h

Issue 1294243004: PlzNavigate: Make ServiceWorker work with PlzNavigate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 5 years, 2 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/common/service_worker/service_worker_utils.h
diff --git a/content/common/service_worker/service_worker_utils.h b/content/common/service_worker/service_worker_utils.h
index 1f7473580e4b95cba7551f1862633d54e388a941..8538b5ea304b5ca365b772fb7ecc144308d3baee 100644
--- a/content/common/service_worker/service_worker_utils.h
+++ b/content/common/service_worker/service_worker_utils.h
@@ -8,6 +8,7 @@
#include "base/macros.h"
#include "content/common/content_export.h"
#include "content/common/service_worker/service_worker_status_code.h"
+#include "content/common/service_worker/service_worker_types.h"
#include "content/public/common/resource_type.h"
#include "url/gurl.h"
@@ -38,6 +39,12 @@ class ServiceWorkerUtils {
static bool ContainsDisallowedCharacter(const GURL& scope,
const GURL& script_url,
std::string* error_message);
+
+ // PlzNavigate
+ // Returns true if the |provider_id| was assigned by the browser process.
+ static bool IsBrowserAssignedProviderId(int provider_id) {
+ return provider_id < kInvalidServiceWorkerProviderId;
+ }
};
class CONTENT_EXPORT LongestScopeMatcher {

Powered by Google App Engine
This is Rietveld 408576698