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

Side by Side Diff: chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc

Issue 131483010: Android: Disallow iframes from requesting to auto-log-in. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Even more updating of the commit messagings. Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 net::URLRequest* request, 635 net::URLRequest* request,
636 content::ResourceContext* resource_context, 636 content::ResourceContext* resource_context,
637 content::ResourceResponse* response, 637 content::ResourceResponse* response,
638 IPC::Sender* sender) { 638 IPC::Sender* sender) {
639 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request); 639 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request);
640 640
641 #if defined(OS_ANDROID) 641 #if defined(OS_ANDROID)
642 // See if the response contains the X-Auto-Login header. If so, this was 642 // See if the response contains the X-Auto-Login header. If so, this was
643 // a request for a login page, and the server is allowing the browser to 643 // a request for a login page, and the server is allowing the browser to
644 // suggest auto-login, if available. 644 // suggest auto-login, if available.
645 AutoLoginPrompter::ShowInfoBarIfPossible(request, info->GetChildID(), 645 if (info->IsMainFrame()) {
646 info->GetRouteID()); 646 AutoLoginPrompter::ShowInfoBarIfPossible(request, info->GetChildID(),
647 info->GetRouteID());
648 }
647 #endif 649 #endif
648 650
649 ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context); 651 ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context);
650 652
651 #if defined(ENABLE_ONE_CLICK_SIGNIN) 653 #if defined(ENABLE_ONE_CLICK_SIGNIN)
652 // See if the response contains the Google-Accounts-SignIn header. If so, 654 // See if the response contains the Google-Accounts-SignIn header. If so,
653 // then the user has just finished signing in, and the server is allowing the 655 // then the user has just finished signing in, and the server is allowing the
654 // browser to suggest connecting the user's profile to the account. 656 // browser to suggest connecting the user's profile to the account.
655 OneClickSigninHelper::ShowInfoBarIfPossible(request, io_data, 657 OneClickSigninHelper::ShowInfoBarIfPossible(request, io_data,
656 info->GetChildID(), 658 info->GetChildID(),
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 url_request->GetTotalReceivedBytes())); 751 url_request->GetTotalReceivedBytes()));
750 } 752 }
751 } 753 }
752 754
753 // static 755 // static
754 void ChromeResourceDispatcherHostDelegate:: 756 void ChromeResourceDispatcherHostDelegate::
755 SetExternalProtocolHandlerDelegateForTesting( 757 SetExternalProtocolHandlerDelegateForTesting(
756 ExternalProtocolHandler::Delegate* delegate) { 758 ExternalProtocolHandler::Delegate* delegate) {
757 g_external_protocol_handler_delegate = delegate; 759 g_external_protocol_handler_delegate = delegate;
758 } 760 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698