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

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

Issue 2943463002: Implement dumb URLLoader{Factory} for ServiceWorker script loading (Closed)
Patch Set: rebased Created 3 years, 6 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_URL_LOADER_JOB_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_LOADER_JOB_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_LOADER_JOB_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_LOADER_JOB_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 "content/browser/loader/url_loader_request_handler.h" 10 #include "content/browser/loader/url_loader_request_handler.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 ServiceWorkerResponseType response_type_ = NOT_DETERMINED; 149 ServiceWorkerResponseType response_type_ = NOT_DETERMINED;
150 LoaderCallback loader_callback_; 150 LoaderCallback loader_callback_;
151 151
152 Delegate* delegate_; 152 Delegate* delegate_;
153 ResourceRequest resource_request_; 153 ResourceRequest resource_request_;
154 base::WeakPtr<storage::BlobStorageContext> blob_storage_context_; 154 base::WeakPtr<storage::BlobStorageContext> blob_storage_context_;
155 std::unique_ptr<ServiceWorkerFetchDispatcher> fetch_dispatcher_; 155 std::unique_ptr<ServiceWorkerFetchDispatcher> fetch_dispatcher_;
156 156
157 bool did_navigation_preload_ = false; 157 bool did_navigation_preload_ = false;
158 ResourceResponseHead response_head_; 158 ResourceResponseHead response_head_;
159 base::Optional<net::SSLInfo> ssl_info_;
159 160
160 // URLLoaderClient binding for loading a blob. 161 // URLLoaderClient binding for loading a blob.
161 mojo::Binding<mojom::URLLoaderClient> blob_client_binding_; 162 mojo::Binding<mojom::URLLoaderClient> blob_client_binding_;
162 163
163 // Pointer to the URLLoaderClient (i.e. NavigationURLLoader). 164 // Pointer to the URLLoaderClient (i.e. NavigationURLLoader).
164 mojom::URLLoaderClientPtr url_loader_client_; 165 mojom::URLLoaderClientPtr url_loader_client_;
165 mojo::Binding<mojom::URLLoader> binding_; 166 mojo::Binding<mojom::URLLoader> binding_;
166 167
167 enum class Status { 168 enum class Status {
168 kNotStarted, 169 kNotStarted,
169 kStarted, 170 kStarted,
170 kSentHeader, 171 kSentHeader,
171 kCompleted, 172 kCompleted,
172 kCancelled 173 kCancelled
173 }; 174 };
174 Status status_ = Status::kNotStarted; 175 Status status_ = Status::kNotStarted;
175 176
176 base::WeakPtrFactory<ServiceWorkerURLLoaderJob> weak_factory_; 177 base::WeakPtrFactory<ServiceWorkerURLLoaderJob> weak_factory_;
177 178
178 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLLoaderJob); 179 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLLoaderJob);
179 }; 180 };
180 181
181 } // namespace content 182 } // namespace content
182 183
183 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_LOADER_JOB_H_ 184 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_LOADER_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698