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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 654713002: Bypass Service Worker for favicon loads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "content/browser/loader/resource_dispatcher_host_impl.h" 7 #include "content/browser/loader/resource_dispatcher_host_impl.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 if (new_request->url().SchemeIs(url::kBlobScheme)) { 1219 if (new_request->url().SchemeIs(url::kBlobScheme)) {
1220 // Hang on to a reference to ensure the blob is not released prior 1220 // Hang on to a reference to ensure the blob is not released prior
1221 // to the job being started. 1221 // to the job being started.
1222 storage::BlobProtocolHandler::SetRequestedBlobDataHandle( 1222 storage::BlobProtocolHandler::SetRequestedBlobDataHandle(
1223 new_request.get(), 1223 new_request.get(),
1224 filter_->blob_storage_context()->context()->GetBlobDataFromPublicURL( 1224 filter_->blob_storage_context()->context()->GetBlobDataFromPublicURL(
1225 new_request->url())); 1225 new_request->url()));
1226 } 1226 }
1227 1227
1228 // Initialize the service worker handler for the request. We don't use 1228 // Initialize the service worker handler for the request. We don't use
1229 // ServiceWorker for synchronous loads to avoid renderer deadlocks. 1229 // ServiceWorker for synchronous loads to avoid renderer deadlocks. We
1230 // don't use ServiceWorker for favicons to avoid cache tainting.
1231 bool is_favicon_load = request_data.resource_type == RESOURCE_TYPE_FAVICON;
1230 ServiceWorkerRequestHandler::InitializeHandler( 1232 ServiceWorkerRequestHandler::InitializeHandler(
1231 new_request.get(), 1233 new_request.get(),
1232 filter_->service_worker_context(), 1234 filter_->service_worker_context(),
1233 blob_context, 1235 blob_context,
1234 child_id, 1236 child_id,
1235 request_data.service_worker_provider_id, 1237 request_data.service_worker_provider_id,
1236 request_data.skip_service_worker || is_sync_load, 1238 request_data.skip_service_worker || is_sync_load || is_favicon_load,
1237 request_data.fetch_request_mode, 1239 request_data.fetch_request_mode,
1238 request_data.fetch_credentials_mode, 1240 request_data.fetch_credentials_mode,
1239 request_data.resource_type, 1241 request_data.resource_type,
1240 request_data.fetch_request_context_type, 1242 request_data.fetch_request_context_type,
1241 request_data.fetch_frame_type, 1243 request_data.fetch_frame_type,
1242 request_data.request_body); 1244 request_data.request_body);
1243 1245
1244 // Have the appcache associate its extra info with the request. 1246 // Have the appcache associate its extra info with the request.
1245 AppCacheInterceptor::SetExtraRequestInfo( 1247 AppCacheInterceptor::SetExtraRequestInfo(
1246 new_request.get(), filter_->appcache_service(), child_id, 1248 new_request.get(), filter_->appcache_service(), child_id,
(...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after
2149 2151
2150 // Add a flag to selectively bypass the data reduction proxy if the resource 2152 // Add a flag to selectively bypass the data reduction proxy if the resource
2151 // type is not an image. 2153 // type is not an image.
2152 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) 2154 if (request_data.resource_type != RESOURCE_TYPE_IMAGE)
2153 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; 2155 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY;
2154 2156
2155 return load_flags; 2157 return load_flags;
2156 } 2158 }
2157 2159
2158 } // namespace content 2160 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698