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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/Tab.java

Issue 646943005: Make GetSecurityLevel available from the java ToolbarModel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved null check Created 6 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarModel.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/Tab.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/Tab.java b/chrome/android/java/src/org/chromium/chrome/browser/Tab.java
index 05bc59723762ed414d7bd717c9ccf9499d706c96..74c98e5c853c5fdbdff41e1154fa86926a22a595 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/Tab.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/Tab.java
@@ -26,7 +26,7 @@ import org.chromium.chrome.browser.dom_distiller.DomDistillerFeedbackReporter;
import org.chromium.chrome.browser.infobar.AutoLoginProcessor;
import org.chromium.chrome.browser.infobar.InfoBarContainer;
import org.chromium.chrome.browser.profiles.Profile;
-import org.chromium.chrome.browser.ui.toolbar.ToolbarModelSecurityLevel;
+import org.chromium.chrome.browser.toolbar.ToolbarModel;
import org.chromium.content.browser.ContentView;
import org.chromium.content.browser.ContentViewClient;
import org.chromium.content.browser.ContentViewCore;
@@ -665,9 +665,9 @@ public class Tab implements NavigationClient {
/**
* @return The current {ToolbarModelSecurityLevel} for the tab.
*/
+ // TODO(tedchoc): Remove this and transition all clients to use ToolbarModel directly.
public int getSecurityLevel() {
- if (mNativeTabAndroid == 0) return ToolbarModelSecurityLevel.NONE;
- return nativeGetSecurityLevel(mNativeTabAndroid);
+ return ToolbarModel.getSecurityLevelForWebContents(getWebContents());
}
/**
@@ -1223,7 +1223,6 @@ public class Tab implements NavigationClient {
private native int nativeLoadUrl(long nativeTabAndroid, String url, String extraHeaders,
byte[] postData, int transition, String referrerUrl, int referrerPolicy,
boolean isRendererInitiated);
- private native int nativeGetSecurityLevel(long nativeTabAndroid);
private native void nativeSetActiveNavigationEntryTitleForUrl(long nativeTabAndroid, String url,
String title);
private native boolean nativePrint(long nativeTabAndroid);
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarModel.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698