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

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

Issue 1271733002: [2/3 chromium] Support redirect option of Request and "opaqueredirect" response type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add _MODE to avoid compile error at Windows. Created 5 years, 4 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_CONTROLLEE_REQUEST_HANDLER _H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HANDLER _H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HANDLER _H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HANDLER _H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "content/browser/service_worker/service_worker_request_handler.h" 9 #include "content/browser/service_worker/service_worker_request_handler.h"
10 #include "content/common/service_worker/service_worker_types.h" 10 #include "content/common/service_worker/service_worker_types.h"
(...skipping 19 matching lines...) Expand all
30 // controlled documents. 30 // controlled documents.
31 class CONTENT_EXPORT ServiceWorkerControlleeRequestHandler 31 class CONTENT_EXPORT ServiceWorkerControlleeRequestHandler
32 : public ServiceWorkerRequestHandler { 32 : public ServiceWorkerRequestHandler {
33 public: 33 public:
34 ServiceWorkerControlleeRequestHandler( 34 ServiceWorkerControlleeRequestHandler(
35 base::WeakPtr<ServiceWorkerContextCore> context, 35 base::WeakPtr<ServiceWorkerContextCore> context,
36 base::WeakPtr<ServiceWorkerProviderHost> provider_host, 36 base::WeakPtr<ServiceWorkerProviderHost> provider_host,
37 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, 37 base::WeakPtr<storage::BlobStorageContext> blob_storage_context,
38 FetchRequestMode request_mode, 38 FetchRequestMode request_mode,
39 FetchCredentialsMode credentials_mode, 39 FetchCredentialsMode credentials_mode,
40 FetchRedirectMode redirect_mode,
40 ResourceType resource_type, 41 ResourceType resource_type,
41 RequestContextType request_context_type, 42 RequestContextType request_context_type,
42 RequestContextFrameType frame_type, 43 RequestContextFrameType frame_type,
43 scoped_refptr<ResourceRequestBody> body); 44 scoped_refptr<ResourceRequestBody> body);
44 ~ServiceWorkerControlleeRequestHandler() override; 45 ~ServiceWorkerControlleeRequestHandler() override;
45 46
46 // Called via custom URLRequestJobFactory. 47 // Called via custom URLRequestJobFactory.
47 net::URLRequestJob* MaybeCreateJob( 48 net::URLRequestJob* MaybeCreateJob(
48 net::URLRequest* request, 49 net::URLRequest* request,
49 net::NetworkDelegate* network_delegate, 50 net::NetworkDelegate* network_delegate,
(...skipping 17 matching lines...) Expand all
67 68
68 // For sub resource case. 69 // For sub resource case.
69 void PrepareForSubResource(); 70 void PrepareForSubResource();
70 71
71 void FallbackToNetwork(); 72 void FallbackToNetwork();
72 73
73 bool is_main_resource_load_; 74 bool is_main_resource_load_;
74 scoped_refptr<ServiceWorkerURLRequestJob> job_; 75 scoped_refptr<ServiceWorkerURLRequestJob> job_;
75 FetchRequestMode request_mode_; 76 FetchRequestMode request_mode_;
76 FetchCredentialsMode credentials_mode_; 77 FetchCredentialsMode credentials_mode_;
78 FetchRedirectMode redirect_mode_;
77 RequestContextType request_context_type_; 79 RequestContextType request_context_type_;
78 RequestContextFrameType frame_type_; 80 RequestContextFrameType frame_type_;
79 scoped_refptr<ResourceRequestBody> body_; 81 scoped_refptr<ResourceRequestBody> body_;
80 ResourceContext* resource_context_; 82 ResourceContext* resource_context_;
81 GURL stripped_url_; 83 GURL stripped_url_;
82 base::TimeTicks worker_start_time_; 84 base::TimeTicks worker_start_time_;
83 base::TimeTicks worker_ready_time_; 85 base::TimeTicks worker_ready_time_;
84 bool skip_service_worker_; 86 bool skip_service_worker_;
85 base::WeakPtrFactory<ServiceWorkerControlleeRequestHandler> weak_factory_; 87 base::WeakPtrFactory<ServiceWorkerControlleeRequestHandler> weak_factory_;
86 88
87 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerControlleeRequestHandler); 89 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerControlleeRequestHandler);
88 }; 90 };
89 91
90 } // namespace content 92 } // namespace content
91 93
92 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HAND LER_H_ 94 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HAND LER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698