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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java

Issue 1357563002: Expose FormatUrlForSecurityDisplay to Java on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using a fake scheme in the test makes formatUrlForSecurityDisplay be conservative, breaking the tes… Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser; 5 package org.chromium.chrome.browser;
6 6
7 import android.animation.Animator; 7 import android.animation.Animator;
8 import android.animation.AnimatorListenerAdapter; 8 import android.animation.AnimatorListenerAdapter;
9 import android.animation.AnimatorSet; 9 import android.animation.AnimatorSet;
10 import android.animation.ObjectAnimator; 10 import android.animation.ObjectAnimator;
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 mContext.getResources().getString(R.string.page_info_connect ion_mixed)); 497 mContext.getResources().getString(R.string.page_info_connect ion_mixed));
498 } else if (mSecurityLevel != ConnectionSecurityLevel.SECURITY_ERROR 498 } else if (mSecurityLevel != ConnectionSecurityLevel.SECURITY_ERROR
499 && mSecurityLevel != ConnectionSecurityLevel.SECURITY_WARNING 499 && mSecurityLevel != ConnectionSecurityLevel.SECURITY_WARNING
500 && mSecurityLevel != ConnectionSecurityLevel.SECURITY_POLICY_WAR NING) { 500 && mSecurityLevel != ConnectionSecurityLevel.SECURITY_POLICY_WAR NING) {
501 messageBuilder.append(mContext.getResources().getString( 501 messageBuilder.append(mContext.getResources().getString(
502 getConnectionMessageId(mSecurityLevel, mIsInternalPage))); 502 getConnectionMessageId(mSecurityLevel, mIsInternalPage)));
503 } else { 503 } else {
504 String originToDisplay; 504 String originToDisplay;
505 try { 505 try {
506 URI parsedUrl = new URI(mFullUrl); 506 URI parsedUrl = new URI(mFullUrl);
507 originToDisplay = UrlUtilities.getOriginForDisplay(parsedUrl, fa lse); 507 originToDisplay = UrlUtilities.formatUrlForSecurityDisplay(parse dUrl, false);
508 } catch (URISyntaxException e) { 508 } catch (URISyntaxException e) {
509 // The URL is invalid - just display the full URL. 509 // The URL is invalid - just display the full URL.
510 originToDisplay = mFullUrl; 510 originToDisplay = mFullUrl;
511 } 511 }
512 512
513 messageBuilder.append(mContext.getResources().getString( 513 messageBuilder.append(mContext.getResources().getString(
514 R.string.page_info_connection_broken, originToDisplay)); 514 R.string.page_info_connection_broken, originToDisplay));
515 } 515 }
516 516
517 if (isConnectionDetailsLinkVisible()) { 517 if (isConnectionDetailsLinkVisible()) {
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 new WebsiteSettingsPopup(activity, profile, webContents); 860 new WebsiteSettingsPopup(activity, profile, webContents);
861 } 861 }
862 862
863 private static native long nativeInit(WebsiteSettingsPopup popup, WebContent s webContents); 863 private static native long nativeInit(WebsiteSettingsPopup popup, WebContent s webContents);
864 864
865 private native void nativeDestroy(long nativeWebsiteSettingsPopupAndroid); 865 private native void nativeDestroy(long nativeWebsiteSettingsPopupAndroid);
866 866
867 private native void nativeOnPermissionSettingChanged(long nativeWebsiteSetti ngsPopupAndroid, 867 private native void nativeOnPermissionSettingChanged(long nativeWebsiteSetti ngsPopupAndroid,
868 int type, int setting); 868 int type, int setting);
869 } 869 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698