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

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

Issue 1652493002: Use request initiator to check for cross origin requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « no previous file | content/browser/service_worker/foreign_fetch_request_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_FOREIGN_FETCH_REQUEST_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_FOREIGN_FETCH_REQUEST_HANDLER_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_FOREIGN_FETCH_REQUEST_HANDLER_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_FOREIGN_FETCH_REQUEST_HANDLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/supports_user_data.h" 10 #include "base/supports_user_data.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 base::TimeTicks service_worker_ready_time) override; 102 base::TimeTicks service_worker_ready_time) override;
103 void OnStartCompleted( 103 void OnStartCompleted(
104 bool was_fetched_via_service_worker, 104 bool was_fetched_via_service_worker,
105 bool was_fallback_required, 105 bool was_fallback_required,
106 const GURL& original_url_via_service_worker, 106 const GURL& original_url_via_service_worker,
107 blink::WebServiceWorkerResponseType response_type_via_service_worker, 107 blink::WebServiceWorkerResponseType response_type_via_service_worker,
108 base::TimeTicks worker_start_time, 108 base::TimeTicks worker_start_time,
109 base::TimeTicks service_worker_ready_time) override; 109 base::TimeTicks service_worker_ready_time) override;
110 ServiceWorkerVersion* GetServiceWorkerVersion( 110 ServiceWorkerVersion* GetServiceWorkerVersion(
111 ServiceWorkerMetrics::URLRequestJobResult* result) override; 111 ServiceWorkerMetrics::URLRequestJobResult* result) override;
112 GURL GetRequestingOrigin() override;
113 112
114 // Sets |job_| to nullptr, and clears all extra response info associated with 113 // Sets |job_| to nullptr, and clears all extra response info associated with
115 // that job. 114 // that job.
116 void ClearJob(); 115 void ClearJob();
117 116
118 scoped_refptr<ServiceWorkerContextWrapper> context_; 117 scoped_refptr<ServiceWorkerContextWrapper> context_;
119 base::WeakPtr<storage::BlobStorageContext> blob_storage_context_; 118 base::WeakPtr<storage::BlobStorageContext> blob_storage_context_;
120 ResourceType resource_type_; 119 ResourceType resource_type_;
121 FetchRequestMode request_mode_; 120 FetchRequestMode request_mode_;
122 FetchCredentialsMode credentials_mode_; 121 FetchCredentialsMode credentials_mode_;
(...skipping 10 matching lines...) Expand all
133 bool use_network_ = false; 132 bool use_network_ = false;
134 133
135 base::WeakPtrFactory<ForeignFetchRequestHandler> weak_factory_; 134 base::WeakPtrFactory<ForeignFetchRequestHandler> weak_factory_;
136 135
137 DISALLOW_COPY_AND_ASSIGN(ForeignFetchRequestHandler); 136 DISALLOW_COPY_AND_ASSIGN(ForeignFetchRequestHandler);
138 }; 137 };
139 138
140 } // namespace content 139 } // namespace content
141 140
142 #endif // CONTENT_BROWSER_SERVICE_WORKER_FOREIGN_FETCH_REQUEST_HANDLER_H_ 141 #endif // CONTENT_BROWSER_SERVICE_WORKER_FOREIGN_FETCH_REQUEST_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/service_worker/foreign_fetch_request_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698