Chromium Code Reviews| 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 20 matching lines...) Expand all Loading... | |
| 31 #include "chrome/browser/renderer_host/chrome_url_request_user_data.h" | 31 #include "chrome/browser/renderer_host/chrome_url_request_user_data.h" |
| 32 #include "chrome/browser/renderer_host/safe_browsing_resource_throttle_factory.h " | 32 #include "chrome/browser/renderer_host/safe_browsing_resource_throttle_factory.h " |
| 33 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 33 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
| 34 #include "chrome/browser/signin/signin_header_helper.h" | 34 #include "chrome/browser/signin/signin_header_helper.h" |
| 35 #include "chrome/browser/ui/auto_login_prompter.h" | 35 #include "chrome/browser/ui/auto_login_prompter.h" |
| 36 #include "chrome/browser/ui/login/login_prompt.h" | 36 #include "chrome/browser/ui/login/login_prompt.h" |
| 37 #include "chrome/browser/ui/sync/one_click_signin_helper.h" | 37 #include "chrome/browser/ui/sync/one_click_signin_helper.h" |
| 38 #include "chrome/common/extensions/extension_constants.h" | 38 #include "chrome/common/extensions/extension_constants.h" |
| 39 #include "chrome/common/extensions/mime_types_handler.h" | 39 #include "chrome/common/extensions/mime_types_handler.h" |
| 40 #include "chrome/common/render_messages.h" | 40 #include "chrome/common/render_messages.h" |
| 41 #include "components/policy/core/browser/policy_header_io_helper.h" | |
|
Joao da Silva
2013/12/09 14:46:21
#ifdef
Andrew T Wilson (Slow)
2013/12/10 07:15:56
Done.
| |
| 41 #include "content/public/browser/browser_thread.h" | 42 #include "content/public/browser/browser_thread.h" |
| 42 #include "content/public/browser/notification_service.h" | 43 #include "content/public/browser/notification_service.h" |
| 43 #include "content/public/browser/render_process_host.h" | 44 #include "content/public/browser/render_process_host.h" |
| 44 #include "content/public/browser/render_view_host.h" | 45 #include "content/public/browser/render_view_host.h" |
| 45 #include "content/public/browser/resource_context.h" | 46 #include "content/public/browser/resource_context.h" |
| 46 #include "content/public/browser/resource_dispatcher_host.h" | 47 #include "content/public/browser/resource_dispatcher_host.h" |
| 47 #include "content/public/browser/resource_request_info.h" | 48 #include "content/public/browser/resource_request_info.h" |
| 48 #include "content/public/browser/stream_handle.h" | 49 #include "content/public/browser/stream_handle.h" |
| 49 #include "content/public/common/resource_response.h" | 50 #include "content/public/common/resource_response.h" |
| 50 #include "extensions/browser/info_map.h" | 51 #include "extensions/browser/info_map.h" |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 281 incognito, | 282 incognito, |
| 282 !incognito && io_data->GetMetricsEnabledStateOnIOThread(), | 283 !incognito && io_data->GetMetricsEnabledStateOnIOThread(), |
| 283 &headers); | 284 &headers); |
| 284 request->SetExtraRequestHeaders(headers); | 285 request->SetExtraRequestHeaders(headers); |
| 285 } | 286 } |
| 286 | 287 |
| 287 #if defined(ENABLE_ONE_CLICK_SIGNIN) | 288 #if defined(ENABLE_ONE_CLICK_SIGNIN) |
| 288 AppendChromeSyncGaiaHeader(request, resource_context); | 289 AppendChromeSyncGaiaHeader(request, resource_context); |
| 289 #endif | 290 #endif |
| 290 | 291 |
| 292 #if defined(ENABLE_CONFIGURATION_POLICY) | |
| 293 if (io_data->policy_header_helper()) | |
| 294 io_data->policy_header_helper()->AddPolicyHeaders(request); | |
| 295 #endif | |
| 296 | |
| 291 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request); | 297 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request); |
| 292 signin::AppendMirrorRequestHeaderIfPossible( | 298 signin::AppendMirrorRequestHeaderIfPossible( |
| 293 request, GURL() /* redirect_url */, | 299 request, GURL() /* redirect_url */, |
| 294 io_data, info->GetChildID(), info->GetRouteID()); | 300 io_data, info->GetChildID(), info->GetRouteID()); |
| 295 | 301 |
| 296 AppendStandardResourceThrottles(request, | 302 AppendStandardResourceThrottles(request, |
| 297 resource_context, | 303 resource_context, |
| 298 resource_type, | 304 resource_type, |
| 299 throttles); | 305 throttles); |
| 300 if (!is_prerendering) { | 306 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 | 644 // exception is requests from gaia webview, since the native profile |
| 639 // management UI is built on top of it. | 645 // management UI is built on top of it. |
| 640 signin::AppendMirrorRequestHeaderIfPossible(request, redirect_url, io_data, | 646 signin::AppendMirrorRequestHeaderIfPossible(request, redirect_url, io_data, |
| 641 info->GetChildID(), info->GetRouteID()); | 647 info->GetChildID(), info->GetRouteID()); |
| 642 | 648 |
| 643 if (io_data->resource_prefetch_predictor_observer()) { | 649 if (io_data->resource_prefetch_predictor_observer()) { |
| 644 io_data->resource_prefetch_predictor_observer()->OnRequestRedirected( | 650 io_data->resource_prefetch_predictor_observer()->OnRequestRedirected( |
| 645 redirect_url, request); | 651 redirect_url, request); |
| 646 } | 652 } |
| 647 } | 653 } |
| OLD | NEW |