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

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

Issue 637243003: Service Worker: Obey content settings when deciding to control a page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@content
Patch Set: explicit, and better log Created 6 years, 2 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 26 matching lines...) Expand all
37 FetchCredentialsMode credentials_mode, 37 FetchCredentialsMode credentials_mode,
38 ResourceType resource_type, 38 ResourceType resource_type,
39 RequestContextType request_context_type, 39 RequestContextType request_context_type,
40 RequestContextFrameType frame_type, 40 RequestContextFrameType frame_type,
41 scoped_refptr<ResourceRequestBody> body); 41 scoped_refptr<ResourceRequestBody> body);
42 virtual ~ServiceWorkerControlleeRequestHandler(); 42 virtual ~ServiceWorkerControlleeRequestHandler();
43 43
44 // Called via custom URLRequestJobFactory. 44 // Called via custom URLRequestJobFactory.
45 virtual net::URLRequestJob* MaybeCreateJob( 45 virtual net::URLRequestJob* MaybeCreateJob(
46 net::URLRequest* request, 46 net::URLRequest* request,
47 net::NetworkDelegate* network_delegate) override; 47 net::NetworkDelegate* network_delegate,
48 ResourceContext* resource_context) override;
48 49
49 virtual void GetExtraResponseInfo( 50 virtual void GetExtraResponseInfo(
50 bool* was_fetched_via_service_worker, 51 bool* was_fetched_via_service_worker,
51 bool* was_fallback_required_by_service_worker, 52 bool* was_fallback_required_by_service_worker,
52 GURL* original_url_via_service_worker, 53 GURL* original_url_via_service_worker,
53 base::TimeTicks* fetch_start_time, 54 base::TimeTicks* fetch_start_time,
54 base::TimeTicks* fetch_ready_time, 55 base::TimeTicks* fetch_ready_time,
55 base::TimeTicks* fetch_end_time) const override; 56 base::TimeTicks* fetch_end_time) const override;
56 57
57 private: 58 private:
(...skipping 13 matching lines...) Expand all
71 // For sub resource case. 72 // For sub resource case.
72 void PrepareForSubResource(); 73 void PrepareForSubResource();
73 74
74 bool is_main_resource_load_; 75 bool is_main_resource_load_;
75 scoped_refptr<ServiceWorkerURLRequestJob> job_; 76 scoped_refptr<ServiceWorkerURLRequestJob> job_;
76 FetchRequestMode request_mode_; 77 FetchRequestMode request_mode_;
77 FetchCredentialsMode credentials_mode_; 78 FetchCredentialsMode credentials_mode_;
78 RequestContextType request_context_type_; 79 RequestContextType request_context_type_;
79 RequestContextFrameType frame_type_; 80 RequestContextFrameType frame_type_;
80 scoped_refptr<ResourceRequestBody> body_; 81 scoped_refptr<ResourceRequestBody> body_;
82 ResourceContext* resource_context_;
81 base::WeakPtrFactory<ServiceWorkerControlleeRequestHandler> weak_factory_; 83 base::WeakPtrFactory<ServiceWorkerControlleeRequestHandler> weak_factory_;
82 84
83 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerControlleeRequestHandler); 85 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerControlleeRequestHandler);
84 }; 86 };
85 87
86 } // namespace content 88 } // namespace content
87 89
88 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HAND LER_H_ 90 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HAND LER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698