| 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 <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/base64.h" | 10 #include "base/base64.h" |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 const GURL& url, | 458 const GURL& url, |
| 459 int child_id, | 459 int child_id, |
| 460 int route_id) { | 460 int route_id) { |
| 461 #if defined(OS_ANDROID) | 461 #if defined(OS_ANDROID) |
| 462 // Android use a resource throttle to handle external as well as internal | 462 // Android use a resource throttle to handle external as well as internal |
| 463 // protocols. | 463 // protocols. |
| 464 return false; | 464 return false; |
| 465 #else | 465 #else |
| 466 | 466 |
| 467 #if defined(ENABLE_EXTENSIONS) | 467 #if defined(ENABLE_EXTENSIONS) |
| 468 if (WebViewRendererState::GetInstance()->IsGuest(child_id)) | 468 if (extensions::WebViewRendererState::GetInstance()->IsGuest(child_id)) |
| 469 return false; | 469 return false; |
| 470 | 470 |
| 471 #endif // defined(ENABLE_EXTENSIONS) | 471 #endif // defined(ENABLE_EXTENSIONS) |
| 472 | 472 |
| 473 BrowserThread::PostTask(BrowserThread::UI, | 473 BrowserThread::PostTask(BrowserThread::UI, |
| 474 FROM_HERE, | 474 FROM_HERE, |
| 475 base::Bind(&LaunchURL, url, child_id, route_id)); | 475 base::Bind(&LaunchURL, url, child_id, route_id)); |
| 476 return true; | 476 return true; |
| 477 #endif | 477 #endif |
| 478 } | 478 } |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 url_request->GetTotalReceivedBytes())); | 733 url_request->GetTotalReceivedBytes())); |
| 734 } | 734 } |
| 735 } | 735 } |
| 736 | 736 |
| 737 // static | 737 // static |
| 738 void ChromeResourceDispatcherHostDelegate:: | 738 void ChromeResourceDispatcherHostDelegate:: |
| 739 SetExternalProtocolHandlerDelegateForTesting( | 739 SetExternalProtocolHandlerDelegateForTesting( |
| 740 ExternalProtocolHandler::Delegate* delegate) { | 740 ExternalProtocolHandler::Delegate* delegate) { |
| 741 g_external_protocol_handler_delegate = delegate; | 741 g_external_protocol_handler_delegate = delegate; |
| 742 } | 742 } |
| OLD | NEW |