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

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

Issue 2105503002: Skip foreign fetch when the skipServiceWorker flag is set on a request. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rephrase SkipServiceWorker comments. Created 4 years, 5 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 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 public ServiceWorkerURLRequestJob::Delegate { 47 public ServiceWorkerURLRequestJob::Delegate {
48 public: 48 public:
49 // Attaches a newly created handler if the given |request| needs to 49 // Attaches a newly created handler if the given |request| needs to
50 // be handled by a foreign fetch handling ServiceWorker. 50 // be handled by a foreign fetch handling ServiceWorker.
51 static void InitializeHandler( 51 static void InitializeHandler(
52 net::URLRequest* request, 52 net::URLRequest* request,
53 ServiceWorkerContextWrapper* context_wrapper, 53 ServiceWorkerContextWrapper* context_wrapper,
54 storage::BlobStorageContext* blob_storage_context, 54 storage::BlobStorageContext* blob_storage_context,
55 int process_id, 55 int process_id,
56 int provider_id, 56 int provider_id,
57 bool skip_service_worker, 57 SkipServiceWorker skip_service_worker,
58 FetchRequestMode request_mode, 58 FetchRequestMode request_mode,
59 FetchCredentialsMode credentials_mode, 59 FetchCredentialsMode credentials_mode,
60 FetchRedirectMode redirect_mode, 60 FetchRedirectMode redirect_mode,
61 ResourceType resource_type, 61 ResourceType resource_type,
62 RequestContextType request_context_type, 62 RequestContextType request_context_type,
63 RequestContextFrameType frame_type, 63 RequestContextFrameType frame_type,
64 scoped_refptr<ResourceRequestBodyImpl> body, 64 scoped_refptr<ResourceRequestBodyImpl> body,
65 bool initiated_in_secure_context); 65 bool initiated_in_secure_context);
66 66
67 // Returns the handler attached to |request|. This may return null 67 // Returns the handler attached to |request|. This may return null
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 bool use_network_ = false; 125 bool use_network_ = false;
126 126
127 base::WeakPtrFactory<ForeignFetchRequestHandler> weak_factory_; 127 base::WeakPtrFactory<ForeignFetchRequestHandler> weak_factory_;
128 128
129 DISALLOW_COPY_AND_ASSIGN(ForeignFetchRequestHandler); 129 DISALLOW_COPY_AND_ASSIGN(ForeignFetchRequestHandler);
130 }; 130 };
131 131
132 } // namespace content 132 } // namespace content
133 133
134 #endif // CONTENT_BROWSER_SERVICE_WORKER_FOREIGN_FETCH_REQUEST_HANDLER_H_ 134 #endif // CONTENT_BROWSER_SERVICE_WORKER_FOREIGN_FETCH_REQUEST_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698