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

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

Issue 332313003: Add Finch experiment for selectively bypassing proxies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: callback design (not yet done) Created 6 years, 6 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 (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>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/bind.h" 13 #include "base/bind.h"
14 #include "base/bind_helpers.h" 14 #include "base/bind_helpers.h"
15 #include "base/command_line.h" 15 #include "base/command_line.h"
16 #include "base/compiler_specific.h" 16 #include "base/compiler_specific.h"
17 #include "base/debug/alias.h" 17 #include "base/debug/alias.h"
18 #include "base/logging.h" 18 #include "base/logging.h"
19 #include "base/memory/scoped_ptr.h" 19 #include "base/memory/scoped_ptr.h"
20 #include "base/memory/shared_memory.h" 20 #include "base/memory/shared_memory.h"
21 #include "base/message_loop/message_loop.h" 21 #include "base/message_loop/message_loop.h"
22 #include "base/metrics/histogram.h" 22 #include "base/metrics/histogram.h"
23 #include "base/metrics/sparse_histogram.h" 23 #include "base/metrics/sparse_histogram.h"
24 #include "base/stl_util.h" 24 #include "base/stl_util.h"
25 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" 25 #include "base/third_party/dynamic_annotations/dynamic_annotations.h"
26 #include "components/data_reduction_proxy/browser/data_reduction_proxy_protocol. h"
26 #include "content/browser/appcache/appcache_interceptor.h" 27 #include "content/browser/appcache/appcache_interceptor.h"
27 #include "content/browser/appcache/chrome_appcache_service.h" 28 #include "content/browser/appcache/chrome_appcache_service.h"
28 #include "content/browser/cert_store_impl.h" 29 #include "content/browser/cert_store_impl.h"
29 #include "content/browser/child_process_security_policy_impl.h" 30 #include "content/browser/child_process_security_policy_impl.h"
30 #include "content/browser/cross_site_request_manager.h" 31 #include "content/browser/cross_site_request_manager.h"
31 #include "content/browser/download/download_resource_handler.h" 32 #include "content/browser/download/download_resource_handler.h"
32 #include "content/browser/download/save_file_manager.h" 33 #include "content/browser/download/save_file_manager.h"
33 #include "content/browser/download/save_file_resource_handler.h" 34 #include "content/browser/download/save_file_resource_handler.h"
34 #include "content/browser/fileapi/chrome_blob_storage_context.h" 35 #include "content/browser/fileapi/chrome_blob_storage_context.h"
35 #include "content/browser/loader/async_resource_handler.h" 36 #include "content/browser/loader/async_resource_handler.h"
(...skipping 1944 matching lines...) Expand 10 before | Expand all | Expand 10 after
1980 } 1981 }
1981 1982
1982 // Raw headers are sensitive, as they include Cookie/Set-Cookie, so only 1983 // Raw headers are sensitive, as they include Cookie/Set-Cookie, so only
1983 // allow requesting them if requester has ReadRawCookies permission. 1984 // allow requesting them if requester has ReadRawCookies permission.
1984 if ((load_flags & net::LOAD_REPORT_RAW_HEADERS) 1985 if ((load_flags & net::LOAD_REPORT_RAW_HEADERS)
1985 && !policy->CanReadRawCookies(child_id)) { 1986 && !policy->CanReadRawCookies(child_id)) {
1986 VLOG(1) << "Denied unauthorized request for raw headers"; 1987 VLOG(1) << "Denied unauthorized request for raw headers";
1987 load_flags &= ~net::LOAD_REPORT_RAW_HEADERS; 1988 load_flags &= ~net::LOAD_REPORT_RAW_HEADERS;
1988 } 1989 }
1989 1990
1991 load_flags |= data_reduction_proxy::BuildLoadFlagsForRequest(
1992 request_data.resource_type);
1993
1990 return load_flags; 1994 return load_flags;
1991 } 1995 }
1992 1996
1993 } // namespace content 1997 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698