OLD | NEW |
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 1969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1980 } | 1980 } |
1981 | 1981 |
1982 // Raw headers are sensitive, as they include Cookie/Set-Cookie, so only | 1982 // Raw headers are sensitive, as they include Cookie/Set-Cookie, so only |
1983 // allow requesting them if requester has ReadRawCookies permission. | 1983 // allow requesting them if requester has ReadRawCookies permission. |
1984 if ((load_flags & net::LOAD_REPORT_RAW_HEADERS) | 1984 if ((load_flags & net::LOAD_REPORT_RAW_HEADERS) |
1985 && !policy->CanReadRawCookies(child_id)) { | 1985 && !policy->CanReadRawCookies(child_id)) { |
1986 VLOG(1) << "Denied unauthorized request for raw headers"; | 1986 VLOG(1) << "Denied unauthorized request for raw headers"; |
1987 load_flags &= ~net::LOAD_REPORT_RAW_HEADERS; | 1987 load_flags &= ~net::LOAD_REPORT_RAW_HEADERS; |
1988 } | 1988 } |
1989 | 1989 |
| 1990 // Add a flag to selectively bypass the data reduction proxy if the resource |
| 1991 // type is not an image. |
| 1992 if (request_data.resource_type != ResourceType::IMAGE) |
| 1993 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; |
| 1994 |
1990 return load_flags; | 1995 return load_flags; |
1991 } | 1996 } |
1992 | 1997 |
1993 } // namespace content | 1998 } // namespace content |
OLD | NEW |