Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc

Issue 11938007: Don't use request user data during one-click sign in (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
diff --git a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
index 57315911cf3b4373bce5556fb98007fa99433dc0..272ee3e20e04114403642079efa3f2fb245db950 100644
--- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
+++ b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
@@ -396,11 +396,14 @@ void ChromeResourceDispatcherHostDelegate::OnResponseStarted(
AutoLoginPrompter::ShowInfoBarIfPossible(request, info->GetChildID(),
info->GetRouteID());
+ ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context);
+
#if defined(ENABLE_ONE_CLICK_SIGNIN)
// See if the response contains the Google-Accounts-SignIn header. If so,
// then the user has just finished signing in, and the server is allowing the
// browser to suggest connecting the user's profile to the account.
- OneClickSigninHelper::ShowInfoBarIfPossible(request, info->GetChildID(),
+ OneClickSigninHelper::ShowInfoBarIfPossible(request, io_data,
+ info->GetChildID(),
info->GetRouteID());
#endif
@@ -415,7 +418,6 @@ void ChromeResourceDispatcherHostDelegate::OnResponseStarted(
}
}
- ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context);
if (io_data->resource_prefetch_predictor_observer())
io_data->resource_prefetch_predictor_observer()->OnResponseStarted(request);
@@ -429,6 +431,8 @@ void ChromeResourceDispatcherHostDelegate::OnRequestRedirected(
content::ResourceResponse* response) {
LoadTimingObserver::PopulateTimingInfo(request, response);
+ ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context);
+
#if defined(ENABLE_ONE_CLICK_SIGNIN)
const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request);
@@ -437,11 +441,11 @@ void ChromeResourceDispatcherHostDelegate::OnRequestRedirected(
// See if the response contains the Google-Accounts-SignIn header. If so,
// then the user has just finished signing in, and the server is allowing the
// browser to suggest connecting the user's profile to the account.
- OneClickSigninHelper::ShowInfoBarIfPossible(request, info->GetChildID(),
+ OneClickSigninHelper::ShowInfoBarIfPossible(request, io_data,
+ info->GetChildID(),
info->GetRouteID());
#endif
- ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context);
if (io_data->resource_prefetch_predictor_observer()) {
io_data->resource_prefetch_predictor_observer()->OnRequestRedirected(
redirect_url, request);

Powered by Google App Engine
This is Rietveld 408576698