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

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

Issue 332393004: Fix crash when using remote DevTools on CrOS WebUI - check for response_headers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 // Ignores x-frame-options for the chrome signin UI. 655 // Ignores x-frame-options for the chrome signin UI.
656 const std::string request_spec( 656 const std::string request_spec(
657 request->first_party_for_cookies().GetOrigin().spec()); 657 request->first_party_for_cookies().GetOrigin().spec());
658 #if defined(OS_CHROMEOS) 658 #if defined(OS_CHROMEOS)
659 if (request_spec == chrome::kChromeUIOobeURL || 659 if (request_spec == chrome::kChromeUIOobeURL ||
660 request_spec == chrome::kChromeUIChromeSigninURL) { 660 request_spec == chrome::kChromeUIChromeSigninURL) {
661 #else 661 #else
662 if (request_spec == chrome::kChromeUIChromeSigninURL) { 662 if (request_spec == chrome::kChromeUIChromeSigninURL) {
663 #endif 663 #endif
664 net::HttpResponseHeaders* response_headers = request->response_headers(); 664 net::HttpResponseHeaders* response_headers = request->response_headers();
665 if (response_headers->HasHeader("x-frame-options")) 665 if (response_headers && response_headers->HasHeader("x-frame-options"))
666 response_headers->RemoveHeader("x-frame-options"); 666 response_headers->RemoveHeader("x-frame-options");
667 } 667 }
668 668
669 prerender::URLRequestResponseStarted(request); 669 prerender::URLRequestResponseStarted(request);
670 } 670 }
671 671
672 void ChromeResourceDispatcherHostDelegate::OnRequestRedirected( 672 void ChromeResourceDispatcherHostDelegate::OnRequestRedirected(
673 const GURL& redirect_url, 673 const GURL& redirect_url,
674 net::URLRequest* request, 674 net::URLRequest* request,
675 content::ResourceContext* resource_context, 675 content::ResourceContext* resource_context,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 url_request->GetTotalReceivedBytes())); 716 url_request->GetTotalReceivedBytes()));
717 } 717 }
718 } 718 }
719 719
720 // static 720 // static
721 void ChromeResourceDispatcherHostDelegate:: 721 void ChromeResourceDispatcherHostDelegate::
722 SetExternalProtocolHandlerDelegateForTesting( 722 SetExternalProtocolHandlerDelegateForTesting(
723 ExternalProtocolHandler::Delegate* delegate) { 723 ExternalProtocolHandler::Delegate* delegate) {
724 g_external_protocol_handler_delegate = delegate; 724 g_external_protocol_handler_delegate = delegate;
725 } 725 }
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