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

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

Issue 2684933011: M57: Add UseCounter for ServiceWorkerNavigationPreload. (Closed)
Patch Set: Created 3 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
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_URL_REQUEST_JOB_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 RequestContextType request_context_type, 94 RequestContextType request_context_type,
95 RequestContextFrameType frame_type, 95 RequestContextFrameType frame_type,
96 scoped_refptr<ResourceRequestBodyImpl> body, 96 scoped_refptr<ResourceRequestBodyImpl> body,
97 ServiceWorkerFetchType fetch_type, 97 ServiceWorkerFetchType fetch_type,
98 const base::Optional<base::TimeDelta>& timeout, 98 const base::Optional<base::TimeDelta>& timeout,
99 Delegate* delegate); 99 Delegate* delegate);
100 100
101 ~ServiceWorkerURLRequestJob() override; 101 ~ServiceWorkerURLRequestJob() override;
102 102
103 const ResourceContext* resource_context() const { return resource_context_; } 103 const ResourceContext* resource_context() const { return resource_context_; }
104 bool did_navigation_preload() const { return did_navigation_preload_; }
104 105
105 // Sets the response type. 106 // Sets the response type.
106 // When an in-flight request possibly needs CORS check, use 107 // When an in-flight request possibly needs CORS check, use
107 // FallbackToNetworkOrRenderer. This method will decide whether the request 108 // FallbackToNetworkOrRenderer. This method will decide whether the request
108 // can directly go to the network or should fallback to a renderer to send 109 // can directly go to the network or should fallback to a renderer to send
109 // CORS preflight. You can use FallbackToNetwork only when, like main resource 110 // CORS preflight. You can use FallbackToNetwork only when, like main resource
110 // or foreign fetch cases, it's apparent that the request should go to the 111 // or foreign fetch cases, it's apparent that the request should go to the
111 // network directly. 112 // network directly.
112 // TODO(shimazu): Update the comment when what should we do at foreign fetch 113 // TODO(shimazu): Update the comment when what should we do at foreign fetch
113 // fallback is determined: crbug.com/604084 114 // fallback is determined: crbug.com/604084
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 std::unique_ptr<FileSizeResolver> file_size_resolver_; 332 std::unique_ptr<FileSizeResolver> file_size_resolver_;
332 333
333 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_; 334 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_;
334 335
335 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob); 336 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob);
336 }; 337 };
337 338
338 } // namespace content 339 } // namespace content
339 340
340 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ 341 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698