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