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

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, 4 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..075d8985188f084c9edb889eaff012328b3f6d99 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 of the _provider_id_ was assigned by the browser process.
nasko 2015/08/31 23:58:17 nit: |provider_id|
Fabrice (no longer in Chrome) 2015/09/07 12:09:48 Done. Fixed the typo too (s/of/if/)
+ static bool IsBrowserAssignedProviderId(int provider_id) {
+ return provider_id < kInvalidServiceWorkerProviderId;
+ }
};
class CONTENT_EXPORT LongestScopeMatcher {

Powered by Google App Engine
This is Rietveld 408576698