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

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

Issue 1471763003: [BackgroundSync] Only allow SyncManager.register to occur from main frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split
Patch Set: Address comments from PS6 Created 5 years, 1 month 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_context_wrapper.h
diff --git a/content/browser/service_worker/service_worker_context_wrapper.h b/content/browser/service_worker/service_worker_context_wrapper.h
index 37a8d2483fd5aa6abfd12af18616e78421d7db6f..eb5cad768980acbea7aa71fc7cd6d80bdffe5567 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.h
+++ b/content/browser/service_worker/service_worker_context_wrapper.h
@@ -42,6 +42,7 @@ class CONTENT_EXPORT ServiceWorkerContextWrapper
public base::RefCountedThreadSafe<ServiceWorkerContextWrapper> {
public:
using StatusCallback = base::Callback<void(ServiceWorkerStatusCode)>;
+ using BoolCallback = base::Callback<void(bool)>;
using FindRegistrationCallback =
ServiceWorkerStorage::FindRegistrationCallback;
using GetRegistrationsInfosCallback =
@@ -103,7 +104,8 @@ class CONTENT_EXPORT ServiceWorkerContextWrapper
std::vector<ServiceWorkerRegistrationInfo> GetAllLiveRegistrationInfo();
std::vector<ServiceWorkerVersionInfo> GetAllLiveVersionInfo();
- bool HasWindowProviderHost(const GURL& origin) const;
+ void HasMainFrameProviderHost(const GURL& origin,
+ const BoolCallback& callback) const;
// Returns the registration whose scope longest matches |document_url|.
// Returns ERROR_NOT_FOUND if it is not found.

Powered by Google App Engine
This is Rietveld 408576698