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

Unified Diff: chrome/browser/chromeos/arc/arc_navigation_throttle.h

Issue 2277533002: Open |current_url| in Chrome when |previous_url| is empty (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Ben's comments Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/arc/arc_navigation_throttle.h
diff --git a/chrome/browser/chromeos/arc/arc_navigation_throttle.h b/chrome/browser/chromeos/arc/arc_navigation_throttle.h
index 6fc6b4a56106d69bc1b7c486cc838e67cbe21cc9..8b2fe9968d81d17d9dafacf94aafabfa74ccfef9 100644
--- a/chrome/browser/chromeos/arc/arc_navigation_throttle.h
+++ b/chrome/browser/chromeos/arc/arc_navigation_throttle.h
@@ -17,6 +17,8 @@
#include "content/public/browser/navigation_throttle.h"
#include "ui/gfx/image/image.h"
+class GURL;
+
namespace content {
class NavigationHandle;
class WebContents;
@@ -54,6 +56,9 @@ class ArcNavigationThrottle : public content::NavigationThrottle {
const ShowIntentPickerCallback& show_intent_picker_cb);
~ArcNavigationThrottle() override;
+ static bool ShouldOverrideUrlLoadingForTesting(const GURL& previous_url,
+ const GURL& current_url);
+
private:
// content::Navigation implementation:
NavigationThrottle::ThrottleCheckResult WillStartRequest() override;
@@ -69,7 +74,8 @@ class ArcNavigationThrottle : public content::NavigationThrottle {
CloseReason close_reason);
// Compares the host name of the referrer and target URL to decide whether
// the navigation needs to be overriden.
- bool ShouldOverrideUrlLoading(content::NavigationHandle* navigation_handle);
+ static bool ShouldOverrideUrlLoading(const GURL& previous_url,
xiyuan 2016/09/20 22:27:58 nit: Move this to cc in an anonymous namespace ?
Yusuke Sato 2016/09/20 22:47:56 That's better, thanks. Done.
+ const GURL& current_url);
// A callback object that allow us to display an IntentPicker when Run() is
// executed, it also allow us to report the user's selection back to

Powered by Google App Engine
This is Rietveld 408576698