Index: content/browser/service_worker/service_worker_context_wrapper.cc |
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc |
index 264cb9a6c90f9399b1bf31d981022fbaddddd3df..f6785c926618483dc96fbf684a29f5d163a75de5 100644 |
--- a/content/browser/service_worker/service_worker_context_wrapper.cc |
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc |
@@ -23,14 +23,11 @@ |
#include "content/browser/service_worker/service_worker_context_observer.h" |
#include "content/browser/service_worker/service_worker_process_manager.h" |
#include "content/browser/service_worker/service_worker_quota_client.h" |
-#include "content/browser/service_worker/service_worker_request_handler.h" |
#include "content/browser/service_worker/service_worker_version.h" |
#include "content/browser/storage_partition_impl.h" |
#include "content/common/service_worker/service_worker_utils.h" |
#include "content/public/browser/browser_context.h" |
#include "content/public/browser/browser_thread.h" |
-#include "content/public/browser/service_worker_context.h" |
-#include "net/base/net_errors.h" |
#include "net/base/net_util.h" |
#include "storage/browser/quota/quota_manager_proxy.h" |
#include "storage/browser/quota/special_storage_policy.h" |
@@ -91,16 +88,6 @@ bool ServiceWorkerContext::IsExcludedHeaderNameForFetchEvent( |
g_excluded_header_name_set.Get().end(); |
} |
-ServiceWorkerContext* ServiceWorkerContext::GetServiceWorkerContext( |
- net::URLRequest* request) { |
- DCHECK_CURRENTLY_ON(BrowserThread::IO); |
- ServiceWorkerRequestHandler* handler = |
- ServiceWorkerRequestHandler::GetHandler(request); |
- if (!handler || !handler->context()) |
- return nullptr; |
- return handler->context()->wrapper_; |
-} |
- |
ServiceWorkerContextWrapper::ServiceWorkerContextWrapper( |
BrowserContext* browser_context) |
: observer_list_( |
@@ -307,26 +294,6 @@ void ServiceWorkerContextWrapper::SetForceUpdateOnPageLoad( |
force_update_on_page_load); |
} |
-static void DidFindRegistrationForDocument( |
- const net::CompletionCallback& callback, |
- ServiceWorkerStatusCode status, |
- const scoped_refptr<ServiceWorkerRegistration>& registration) { |
- int rv = registration ? net::OK : net::ERR_CACHE_MISS; |
- // Use RunSoon here because FindRegistrationForDocument can complete |
- // immediately but CanHandleMainResourceOffline must be async. |
- RunSoon(base::Bind(callback, rv)); |
-} |
- |
-void ServiceWorkerContextWrapper::CanHandleMainResourceOffline( |
- const GURL& url, |
- const GURL& first_party, |
- const net::CompletionCallback& callback) { |
- DCHECK_CURRENTLY_ON(BrowserThread::IO); |
- context()->storage()->FindRegistrationForDocument( |
- net::SimplifyUrlForRequest(url), |
- base::Bind(&DidFindRegistrationForDocument, callback)); |
-} |
- |
void ServiceWorkerContextWrapper::GetAllOriginsInfo( |
const GetUsageInfoCallback& callback) { |
DCHECK_CURRENTLY_ON(BrowserThread::IO); |