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

Unified Diff: chrome/browser/ui/browser_navigator.cc

Issue 22944002: Implementation of the "Redirect URLs to Packaged Apps" feature. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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/ui/browser_navigator.cc
diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc
index fb73fe7d6191e54d1d4abd8e98c1bbc8ab3a86c7..2f50d8e42cabeb24d4a9dbb8f5a79e03c96e3304 100644
--- a/chrome/browser/ui/browser_navigator.cc
+++ b/chrome/browser/ui/browser_navigator.cc
@@ -458,9 +458,14 @@ void Navigate(NavigateParams* params) {
return;
ExtensionService* service = params->initiating_profile->GetExtensionService();
- if (service)
+ if (service) {
+ // TODO(sergeygs): Shouldn't we return from here if this returns true?
service->ShouldBlockUrlInBrowserTab(&params->url);
+ if (service->MaybeRedirectUrlToApp(params->url, params->referrer.url))
+ return;
+ }
+
// The browser window may want to adjust the disposition.
if (params->disposition == NEW_POPUP &&
source_browser &&

Powered by Google App Engine
This is Rietveld 408576698