| 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 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.
h" | 5 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.
h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 #include "content/public/common/resource_response.h" | 49 #include "content/public/common/resource_response.h" |
| 50 #include "extensions/browser/info_map.h" | 50 #include "extensions/browser/info_map.h" |
| 51 #include "extensions/common/constants.h" | 51 #include "extensions/common/constants.h" |
| 52 #include "extensions/common/user_script.h" | 52 #include "extensions/common/user_script.h" |
| 53 #include "net/base/load_flags.h" | 53 #include "net/base/load_flags.h" |
| 54 #include "net/base/load_timing_info.h" | 54 #include "net/base/load_timing_info.h" |
| 55 #include "net/base/request_priority.h" | 55 #include "net/base/request_priority.h" |
| 56 #include "net/http/http_response_headers.h" | 56 #include "net/http/http_response_headers.h" |
| 57 #include "net/url_request/url_request.h" | 57 #include "net/url_request/url_request.h" |
| 58 | 58 |
| 59 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 60 #include "components/policy/core/browser/policy_header_io_helper.h" |
| 61 #endif |
| 62 |
| 59 #if defined(ENABLE_MANAGED_USERS) | 63 #if defined(ENABLE_MANAGED_USERS) |
| 60 #include "chrome/browser/managed_mode/managed_mode_resource_throttle.h" | 64 #include "chrome/browser/managed_mode/managed_mode_resource_throttle.h" |
| 61 #endif | 65 #endif |
| 62 | 66 |
| 63 #if defined(USE_SYSTEM_PROTOBUF) | 67 #if defined(USE_SYSTEM_PROTOBUF) |
| 64 #include <google/protobuf/repeated_field.h> | 68 #include <google/protobuf/repeated_field.h> |
| 65 #else | 69 #else |
| 66 #include "third_party/protobuf/src/google/protobuf/repeated_field.h" | 70 #include "third_party/protobuf/src/google/protobuf/repeated_field.h" |
| 67 #endif | 71 #endif |
| 68 | 72 |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 incognito, | 285 incognito, |
| 282 !incognito && io_data->GetMetricsEnabledStateOnIOThread(), | 286 !incognito && io_data->GetMetricsEnabledStateOnIOThread(), |
| 283 &headers); | 287 &headers); |
| 284 request->SetExtraRequestHeaders(headers); | 288 request->SetExtraRequestHeaders(headers); |
| 285 } | 289 } |
| 286 | 290 |
| 287 #if defined(ENABLE_ONE_CLICK_SIGNIN) | 291 #if defined(ENABLE_ONE_CLICK_SIGNIN) |
| 288 AppendChromeSyncGaiaHeader(request, resource_context); | 292 AppendChromeSyncGaiaHeader(request, resource_context); |
| 289 #endif | 293 #endif |
| 290 | 294 |
| 295 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 296 if (io_data->policy_header_helper()) |
| 297 io_data->policy_header_helper()->AddPolicyHeaders(request); |
| 298 #endif |
| 299 |
| 291 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request); | 300 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request); |
| 292 signin::AppendMirrorRequestHeaderIfPossible( | 301 signin::AppendMirrorRequestHeaderIfPossible( |
| 293 request, GURL() /* redirect_url */, | 302 request, GURL() /* redirect_url */, |
| 294 io_data, info->GetChildID(), info->GetRouteID()); | 303 io_data, info->GetChildID(), info->GetRouteID()); |
| 295 | 304 |
| 296 AppendStandardResourceThrottles(request, | 305 AppendStandardResourceThrottles(request, |
| 297 resource_context, | 306 resource_context, |
| 298 resource_type, | 307 resource_type, |
| 299 throttles); | 308 throttles); |
| 300 if (!is_prerendering) { | 309 if (!is_prerendering) { |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 // exception is requests from gaia webview, since the native profile | 647 // exception is requests from gaia webview, since the native profile |
| 639 // management UI is built on top of it. | 648 // management UI is built on top of it. |
| 640 signin::AppendMirrorRequestHeaderIfPossible(request, redirect_url, io_data, | 649 signin::AppendMirrorRequestHeaderIfPossible(request, redirect_url, io_data, |
| 641 info->GetChildID(), info->GetRouteID()); | 650 info->GetChildID(), info->GetRouteID()); |
| 642 | 651 |
| 643 if (io_data->resource_prefetch_predictor_observer()) { | 652 if (io_data->resource_prefetch_predictor_observer()) { |
| 644 io_data->resource_prefetch_predictor_observer()->OnRequestRedirected( | 653 io_data->resource_prefetch_predictor_observer()->OnRequestRedirected( |
| 645 redirect_url, request); | 654 redirect_url, request); |
| 646 } | 655 } |
| 647 } | 656 } |
| OLD | NEW |