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

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

Issue 1515703005: WebRequest API: add more resource types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 (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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 UMA_HISTOGRAM_ENUMERATION("Net.Certificate.SHA1.Subresource", 195 UMA_HISTOGRAM_ENUMERATION("Net.Certificate.SHA1.Subresource",
196 sha1_histogram, 196 sha1_histogram,
197 SHA1_HISTOGRAM_TYPES_MAX); 197 SHA1_HISTOGRAM_TYPES_MAX);
198 } 198 }
199 } 199 }
200 200
201 bool IsDetachableResourceType(ResourceType type) { 201 bool IsDetachableResourceType(ResourceType type) {
202 switch (type) { 202 switch (type) {
203 case RESOURCE_TYPE_PREFETCH: 203 case RESOURCE_TYPE_PREFETCH:
204 case RESOURCE_TYPE_PING: 204 case RESOURCE_TYPE_PING:
205 case RESOURCE_TYPE_CSP_REPORT:
205 return true; 206 return true;
206 default: 207 default:
207 return false; 208 return false;
208 } 209 }
209 } 210 }
210 211
211 // Aborts a request before an URLRequest has actually been created. 212 // Aborts a request before an URLRequest has actually been created.
212 void AbortRequestBeforeItStarts(ResourceMessageFilter* filter, 213 void AbortRequestBeforeItStarts(ResourceMessageFilter* filter,
213 IPC::Message* sync_result, 214 IPC::Message* sync_result,
214 int request_id) { 215 int request_id) {
(...skipping 2225 matching lines...) Expand 10 before | Expand all | Expand 10 after
2440 load_flags |= net::LOAD_PREFETCH; 2441 load_flags |= net::LOAD_PREFETCH;
2441 } 2442 }
2442 2443
2443 if (is_sync_load) 2444 if (is_sync_load)
2444 load_flags |= net::LOAD_IGNORE_LIMITS; 2445 load_flags |= net::LOAD_IGNORE_LIMITS;
2445 2446
2446 return load_flags; 2447 return load_flags;
2447 } 2448 }
2448 2449
2449 } // namespace content 2450 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698