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

Side by Side Diff: content/browser/service_worker/service_worker_context_request_handler.h

Issue 1867293004: Set service worker response info data for foreign fetch intercepted fetches. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ff-check-origin
Patch Set: address comment Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_REQUEST_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_REQUEST_HANDLER_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_REQUEST_HANDLER_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_REQUEST_HANDLER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 14 matching lines...) Expand all
25 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, 25 base::WeakPtr<storage::BlobStorageContext> blob_storage_context,
26 ResourceType resource_type); 26 ResourceType resource_type);
27 ~ServiceWorkerContextRequestHandler() override; 27 ~ServiceWorkerContextRequestHandler() override;
28 28
29 // Called via custom URLRequestJobFactory. 29 // Called via custom URLRequestJobFactory.
30 net::URLRequestJob* MaybeCreateJob( 30 net::URLRequestJob* MaybeCreateJob(
31 net::URLRequest* request, 31 net::URLRequest* request,
32 net::NetworkDelegate* network_delegate, 32 net::NetworkDelegate* network_delegate,
33 ResourceContext* resource_context) override; 33 ResourceContext* resource_context) override;
34 34
35 void GetExtraResponseInfo(ResourceResponseInfo* response_info) const override;
36
37 private: 35 private:
38 bool ShouldAddToScriptCache(const GURL& url); 36 bool ShouldAddToScriptCache(const GURL& url);
39 bool ShouldReadFromScriptCache(const GURL& url, int64_t* resource_id_out); 37 bool ShouldReadFromScriptCache(const GURL& url, int64_t* resource_id_out);
40 38
41 scoped_refptr<ServiceWorkerVersion> version_; 39 scoped_refptr<ServiceWorkerVersion> version_;
42 40
43 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextRequestHandler); 41 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextRequestHandler);
44 }; 42 };
45 43
46 } // namespace content 44 } // namespace content
47 45
48 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_REQUEST_HANDLER _H_ 46 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_REQUEST_HANDLER _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698