| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/content_settings/host_content_settings_map.h" | 9 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 10 #include "chrome/browser/download/download_request_limiter.h" | 10 #include "chrome/browser/download/download_request_limiter.h" |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 // headers to the renderer. | 314 // headers to the renderer. |
| 315 const content::ResourceContext& resource_context = filter->resource_context(); | 315 const content::ResourceContext& resource_context = filter->resource_context(); |
| 316 ProfileIOData* io_data = | 316 ProfileIOData* io_data = |
| 317 reinterpret_cast<ProfileIOData*>(resource_context.GetUserData(NULL)); | 317 reinterpret_cast<ProfileIOData*>(resource_context.GetUserData(NULL)); |
| 318 HostContentSettingsMap* map = io_data->GetHostContentSettingsMap(); | 318 HostContentSettingsMap* map = io_data->GetHostContentSettingsMap(); |
| 319 | 319 |
| 320 ResourceDispatcherHostRequestInfo* info = | 320 ResourceDispatcherHostRequestInfo* info = |
| 321 resource_dispatcher_host_->InfoForRequest(request); | 321 resource_dispatcher_host_->InfoForRequest(request); |
| 322 filter->Send(new ChromeViewMsg_SetContentSettingsForLoadingURL( | 322 filter->Send(new ChromeViewMsg_SetContentSettingsForLoadingURL( |
| 323 info->route_id(), request->url(), | 323 info->route_id(), request->url(), |
| 324 map->GetContentSettings(request->url(), request->url()))); | 324 map->GetContentSettings(request->url()))); |
| 325 | 325 |
| 326 // See if the response contains the X-Auto-Login header. If so, this was | 326 // See if the response contains the X-Auto-Login header. If so, this was |
| 327 // a request for a login page, and the server is allowing the browser to | 327 // a request for a login page, and the server is allowing the browser to |
| 328 // suggest auto-login, if available. | 328 // suggest auto-login, if available. |
| 329 AutoLoginPrompter::ShowInfoBarIfPossible(request, info->child_id(), | 329 AutoLoginPrompter::ShowInfoBarIfPossible(request, info->child_id(), |
| 330 info->route_id()); | 330 info->route_id()); |
| 331 } | 331 } |
| 332 | 332 |
| 333 void ChromeResourceDispatcherHostDelegate::OnRequestRedirected( | 333 void ChromeResourceDispatcherHostDelegate::OnRequestRedirected( |
| 334 net::URLRequest* request, | 334 net::URLRequest* request, |
| 335 ResourceResponse* response, | 335 ResourceResponse* response, |
| 336 ResourceMessageFilter* filter) { | 336 ResourceMessageFilter* filter) { |
| 337 LoadTimingObserver::PopulateTimingInfo(request, response); | 337 LoadTimingObserver::PopulateTimingInfo(request, response); |
| 338 } | 338 } |
| OLD | NEW |