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

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

Issue 9453035: Implement one click login. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Cleanup old filenames from chrome_browser.gypi Created 8 years, 10 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
« no previous file with comments | « chrome/app/google_chrome_strings.grd ('k') | chrome/browser/ui/cocoa/one_click_signin_dialog_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
===================================================================
--- chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc (revision 124931)
+++ chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc (working copy)
@@ -25,6 +25,7 @@
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/browser/ui/auto_login_prompter.h"
#include "chrome/browser/ui/login/login_prompt.h"
+#include "chrome/browser/ui/sync/one_click_signin_helper.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/user_script.h"
#include "chrome/common/render_messages.h"
@@ -338,4 +339,15 @@
net::URLRequest* request,
content::ResourceResponse* response) {
LoadTimingObserver::PopulateTimingInfo(request, response);
+
+#if defined(ENABLE_ONE_CLICK_SIGNIN)
+ ResourceDispatcherHostRequestInfo* info =
+ resource_dispatcher_host_->InfoForRequest(request);
+
+ // See if the response contains the X-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->child_id(),
+ info->route_id());
+#endif
}
« no previous file with comments | « chrome/app/google_chrome_strings.grd ('k') | chrome/browser/ui/cocoa/one_click_signin_dialog_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698