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

Unified Diff: chrome/browser/ui/android/external_protocol_dialog_android.cc

Issue 11265013: [Android] Use resource throttle instead of HandleExternalProtocol. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix android webview compilation error (adjust header). Created 8 years, 2 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/android/external_protocol_dialog_android.cc
diff --git a/chrome/browser/ui/android/external_protocol_dialog_android.cc b/chrome/browser/ui/android/external_protocol_dialog_android.cc
index 6d5673f470a1db00f343580d4c331e743796dfd2..6362e6c40536810c189baf20b4345576122aea90 100644
--- a/chrome/browser/ui/android/external_protocol_dialog_android.cc
+++ b/chrome/browser/ui/android/external_protocol_dialog_android.cc
@@ -2,28 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/logging.h"
-#include "chrome/browser/component/navigation_interception/intercept_navigation_delegate.h"
#include "chrome/browser/external_protocol/external_protocol_handler.h"
-#include "chrome/browser/tab_contents/tab_util.h"
-#include "content/public/browser/web_contents.h"
-using content::WebContents;
+#include "base/logging.h"
// static
void ExternalProtocolHandler::RunExternalProtocolDialog(
const GURL& url, int render_process_host_id, int routing_id) {
- WebContents* web_contents = tab_util::GetWebContentsByID(
- render_process_host_id, routing_id);
- if (!web_contents)
- return;
- navigation_interception::InterceptNavigationDelegate* delegate =
- navigation_interception::InterceptNavigationDelegate::Get(web_contents);
- if (!delegate)
- return;
-
- // TODO(jknotten): The call to ShouldIgnoreNavigation returns false if there
- // are no applications that can handle the given URL. In this case, an error
- // page should be displayed to the user.
- delegate->ShouldIgnoreNavigation(url, true /* has_user_gesture */ );
+ // Chrome on Android uses a throttle-based mechansim to intercept links
+ // so that the user may choose to run an Android application instead of
+ // loading the link in the browser. The throttle is also used to handle
+ // external protocols, so this code should not be reachable.
+ NOTREACHED();
}

Powered by Google App Engine
This is Rietveld 408576698