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

Unified Diff: java/org/chromium/distiller/ParsedUrl.java

Issue 1178633002: implement parser for new pagination algorithm (Closed) Base URL: https://github.com/chromium/dom-distiller.git@master
Patch Set: addr wychen's comments Created 5 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: java/org/chromium/distiller/ParsedUrl.java
diff --git a/java/org/chromium/distiller/ParsedUrl.java b/java/org/chromium/distiller/ParsedUrl.java
index 3f6dc5aca694b25c88d06903cc8c668536218393..11e00cd8692207b8e047ac6053cc461e6159dbf9 100644
--- a/java/org/chromium/distiller/ParsedUrl.java
+++ b/java/org/chromium/distiller/ParsedUrl.java
@@ -51,6 +51,10 @@ public final class ParsedUrl {
return this.password;
}-*/;
+ private final native String getHash() /*-{
+ return this.hash;
+ }-*/;
+
private final native String setUsername(String username) /*-{
this.username = username;
}-*/;
@@ -59,6 +63,10 @@ public final class ParsedUrl {
this.password = password;
}-*/;
+ private final native String setHash(String hash) /*-{
+ this.hash = hash;
+ }-*/;
+
private final native String replaceQueryValue(String queryName, String currentQueryValue,
String newQueryValue) /*-{
return this.href.replace(queryName + "=" + currentQueryValue,
@@ -141,6 +149,14 @@ public final class ParsedUrl {
}
/**
+ * Returns URLUtils.hash.
+ */
+ public final String getHash() {
+ return mUrl.getHash();
+ }
+
+ /**
+ /**
* Returns a array of components broken down from URLUtils.path without the part after ';'.
*/
public final String[] getPathComponents() {
@@ -194,6 +210,13 @@ public final class ParsedUrl {
}
/**
+ * Sets URLUtils.hash.
+ */
+ public final String setHash(String hash) {
+ return mUrl.setHash(hash);
+ }
+
+ /**
* Replaces the specified name-value query parameter with the new query value.
* Returns the new HRef. The original HRef is not mutated.
*/
« no previous file with comments | « java/org/chromium/distiller/PageParameterParser.java ('k') | javatests/org/chromium/distiller/PageParameterParserTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698