| 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 "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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 return true; | 248 return true; |
| 249 } | 249 } |
| 250 | 250 |
| 251 return false; | 251 return false; |
| 252 } | 252 } |
| 253 | 253 |
| 254 ResourceDispatcherHostLoginDelegate* | 254 ResourceDispatcherHostLoginDelegate* |
| 255 ChromeResourceDispatcherHostDelegate::CreateLoginDelegate( | 255 ChromeResourceDispatcherHostDelegate::CreateLoginDelegate( |
| 256 net::AuthChallengeInfo* auth_info, net::URLRequest* request) { | 256 net::AuthChallengeInfo* auth_info, net::URLRequest* request) { |
| 257 std::string instant_header_value; | 257 std::string instant_header_value; |
| 258 // For instant, return a NULl delegate. Auth navigations don't commit the load | 258 // For instant, return a NULL delegate. Auth navigations don't commit the load |
| 259 // (the load remains pending) until the user cancels or succeeds in | 259 // (the load remains pending) until the user cancels or succeeds in |
| 260 // authorizing. Since we don't allow merging of WebContents with pending loads | 260 // authorizing. Since we don't allow merging of WebContents with pending loads |
| 261 // we disallow auth dialogs from showing during instant. Returning NULL does | 261 // we disallow auth dialogs from showing during instant. Returning NULL does |
| 262 // that. | 262 // that. |
| 263 // TODO: see if we can handle this case more robustly. | 263 // TODO: see if we can handle this case more robustly. |
| 264 if (request->extra_request_headers().GetHeader( | 264 if (request->extra_request_headers().GetHeader( |
| 265 InstantLoader::kInstantHeader, &instant_header_value) && | 265 InstantLoader::kInstantHeader, &instant_header_value) && |
| 266 instant_header_value == InstantLoader::kInstantHeaderValue) | 266 instant_header_value == InstantLoader::kInstantHeaderValue) |
| 267 return NULL; | 267 return NULL; |
| 268 return CreateLoginPrompt(auth_info, request); | 268 return CreateLoginPrompt(auth_info, request); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 #if defined(ENABLE_ONE_CLICK_SIGNIN) | 344 #if defined(ENABLE_ONE_CLICK_SIGNIN) |
| 345 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request); | 345 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request); |
| 346 | 346 |
| 347 // See if the response contains the Google-Accounts-SignIn header. If so, | 347 // See if the response contains the Google-Accounts-SignIn header. If so, |
| 348 // then the user has just finished signing in, and the server is allowing the | 348 // then the user has just finished signing in, and the server is allowing the |
| 349 // browser to suggest connecting the user's profile to the account. | 349 // browser to suggest connecting the user's profile to the account. |
| 350 OneClickSigninHelper::ShowInfoBarIfPossible(request, info->GetChildID(), | 350 OneClickSigninHelper::ShowInfoBarIfPossible(request, info->GetChildID(), |
| 351 info->GetRouteID()); | 351 info->GetRouteID()); |
| 352 #endif | 352 #endif |
| 353 } | 353 } |
| OLD | NEW |