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

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

Issue 1171333003: Move net::FormatUrl and friends outside of //net and into //components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase again now that CQ is fixed Created 5 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 unified diff | Download patch
« no previous file with comments | « chrome/DEPS ('k') | chrome/browser/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.text.TextUtils; 7 import android.text.TextUtils;
8 8
9 import org.chromium.base.CollectionUtil; 9 import org.chromium.base.CollectionUtil;
10 import org.chromium.base.Log; 10 import org.chromium.base.Log;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 /** 119 /**
120 * @param uri A URI. 120 * @param uri A URI.
121 * 121 *
122 * @return Whether the URI's scheme is for a internal chrome page. 122 * @return Whether the URI's scheme is for a internal chrome page.
123 */ 123 */
124 public static boolean isInternalScheme(URI uri) { 124 public static boolean isInternalScheme(URI uri) {
125 return INTERNAL_SCHEMES.contains(uri.getScheme()); 125 return INTERNAL_SCHEMES.contains(uri.getScheme());
126 } 126 }
127 127
128 /** 128 /**
129 * Refer to url_fixer::FixupURL. 129 * Refer to url_formatter::FixupURL.
130 * 130 *
131 * Given a URL-like string, returns a real URL or null. For example: 131 * Given a URL-like string, returns a real URL or null. For example:
132 * - "google.com" -> "http://google.com/" 132 * - "google.com" -> "http://google.com/"
133 * - "about:" -> "chrome://version/" 133 * - "about:" -> "chrome://version/"
134 * - "//mail.google.com:/" -> "file:///mail.google.com:/" 134 * - "//mail.google.com:/" -> "file:///mail.google.com:/"
135 * - "..." -> null 135 * - "..." -> null
136 */ 136 */
137 public static String fixupUrl(String uri) { 137 public static String fixupUrl(String uri) {
138 if (TextUtils.isEmpty(uri)) return null; 138 if (TextUtils.isEmpty(uri)) return null;
139 return nativeFixupUrl(uri, null); 139 return nativeFixupUrl(uri, null);
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 } 375 }
376 376
377 private static native boolean nativeSameDomainOrHost(String primaryUrl, Stri ng secondaryUrl, 377 private static native boolean nativeSameDomainOrHost(String primaryUrl, Stri ng secondaryUrl,
378 boolean includePrivateRegistries); 378 boolean includePrivateRegistries);
379 private static native String nativeGetDomainAndRegistry(String url, 379 private static native String nativeGetDomainAndRegistry(String url,
380 boolean includePrivateRegistries); 380 boolean includePrivateRegistries);
381 public static native boolean nativeIsGoogleSearchUrl(String url); 381 public static native boolean nativeIsGoogleSearchUrl(String url);
382 public static native boolean nativeIsGoogleHomePageUrl(String url); 382 public static native boolean nativeIsGoogleHomePageUrl(String url);
383 private static native String nativeFixupUrl(String url, String desiredTld); 383 private static native String nativeFixupUrl(String url, String desiredTld);
384 } 384 }
OLDNEW
« no previous file with comments | « chrome/DEPS ('k') | chrome/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698