Chromium Code Reviews| Index: chrome/browser/ui/ash/chrome_shell_delegate.cc |
| diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.cc b/chrome/browser/ui/ash/chrome_shell_delegate.cc |
| index 96f7ad8c785dcd671193f528481026100f707216..a3b2805b2ec410726c4d76e8a8bf04999a5e3391 100644 |
| --- a/chrome/browser/ui/ash/chrome_shell_delegate.cc |
| +++ b/chrome/browser/ui/ash/chrome_shell_delegate.cc |
| @@ -29,6 +29,7 @@ |
| #include "chrome/browser/chrome_notification_types.h" |
| #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
| #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
| +#include "chrome/browser/chromeos/arc/fileapi/arc_content_file_system_url_util.h" |
| #include "chrome/browser/chromeos/background/ash_wallpaper_delegate.h" |
| #include "chrome/browser/chromeos/display/display_configuration_observer.h" |
| #include "chrome/browser/chromeos/display/display_preferences.h" |
| @@ -409,10 +410,17 @@ void ChromeShellDelegate::OpenUrlFromArc(const GURL& url) { |
| if (!url.is_valid()) |
|
oshima
2016/11/11 01:13:25
Just curious. Is there any reason why we don't sho
hashimoto
2016/11/11 01:26:19
This code was introduced by yusukes@, I have no id
|
| return; |
| + GURL url_to_open = url; |
| + if (url.SchemeIs(url::kFileScheme) || url.SchemeIs(url::kContentScheme)) { |
| + // Chrome cannot open this URL. Read the contents via ARC content file |
| + // system with an external file URL. |
| + url_to_open = arc::ArcUrlToExternalFileUrl(url_to_open); |
| + } |
| + |
| chrome::ScopedTabbedBrowserDisplayer displayer( |
| ProfileManager::GetActiveUserProfile()); |
| chrome::AddSelectedTabWithURL( |
| - displayer.browser(), url, |
| + displayer.browser(), url_to_open, |
| ui::PageTransitionFromInt(ui::PAGE_TRANSITION_LINK | |
| ui::PAGE_TRANSITION_FROM_API)); |