Index: chrome/browser/chromeos/arc/arc_navigation_throttle.cc |
diff --git a/chrome/browser/chromeos/arc/arc_navigation_throttle.cc b/chrome/browser/chromeos/arc/arc_navigation_throttle.cc |
index 3a5647a60c3d78aa7ac93afec0181a80e660d845..aea9612bedeb4f318a12f647334137bdf26e9c50 100644 |
--- a/chrome/browser/chromeos/arc/arc_navigation_throttle.cc |
+++ b/chrome/browser/chromeos/arc/arc_navigation_throttle.cc |
@@ -10,6 +10,7 @@ |
#include "base/logging.h" |
#include "base/memory/ref_counted.h" |
#include "base/metrics/histogram_macros.h" |
+#include "chrome/browser/chromeos/arc/page_transition_util.h" |
#include "components/arc/arc_bridge_service.h" |
#include "components/arc/arc_service_manager.h" |
#include "components/arc/intent_helper/arc_intent_helper_bridge.h" |
@@ -78,26 +79,6 @@ content::NavigationThrottle::ThrottleCheckResult |
ArcNavigationThrottle::HandleRequest() { |
const GURL& url = navigation_handle()->GetURL(); |
- // Mask out any redirect qualifiers - this method handles navigation from |
- // redirect and non-redirect navigations equivalently. |
- const ui::PageTransition transition = |
Luis Héctor Chávez
2016/09/15 22:42:11
Naïve question: shouldn't there be a if (ShouldIgn
Yusuke Sato
2016/09/15 23:08:24
Done.
I moved it to line 247 but it was probably
|
- ui::PageTransitionFromInt(navigation_handle()->GetPageTransition() & |
- ~ui::PAGE_TRANSITION_IS_REDIRECT_MASK); |
- |
- if (!ui::PageTransitionCoreTypeIs(transition, ui::PAGE_TRANSITION_LINK)) { |
- // Allow navigation to proceed if this event wasn't spawned by the user |
- // clicking on a link. |
- return content::NavigationThrottle::PROCEED; |
- } |
- |
- if (ui::PageTransitionGetQualifier(transition) != 0) { |
- // Qualifiers indicate that this navigation was the result of a click on a |
- // forward/back button, or typing in the URL bar, etc. Don't pass any of |
- // those types of navigations to the intent helper (see crbug.com/630072). |
- // Note that redirects, which we do pass on, are masked out above. |
- return content::NavigationThrottle::PROCEED; |
- } |
- |
if (!ShouldOverrideUrlLoading(navigation_handle())) |
return content::NavigationThrottle::PROCEED; |
@@ -263,6 +244,9 @@ void ArcNavigationThrottle::OnIntentPickerClosed( |
bool ArcNavigationThrottle::ShouldOverrideUrlLoading( |
content::NavigationHandle* navigation_handle) { |
+ if (ShouldIgnoreNavigation(navigation_handle->GetPageTransition())) |
+ return false; |
+ |
GURL previous_url = navigation_handle->GetReferrer().url; |
GURL current_url = navigation_handle->GetURL(); |
return !net::registry_controlled_domains::SameDomainOrHost( |