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

Unified Diff: components/cronet/android/api/src/org/chromium/net/ApiVersion.template

Issue 2660963002: Cronet: a framework to provide alternative Cronet implementations (Closed)
Patch Set: Created 3 years, 11 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: components/cronet/android/api/src/org/chromium/net/ApiVersion.template
diff --git a/components/cronet/android/api/src/org/chromium/net/ApiVersion.template b/components/cronet/android/api/src/org/chromium/net/ApiVersion.template
index 8e74ed9831fa832619703314c6e860e4157e3a85..ca8114cb48656978e954930ec6138d6680f84187 100644
--- a/components/cronet/android/api/src/org/chromium/net/ApiVersion.template
+++ b/components/cronet/android/api/src/org/chromium/net/ApiVersion.template
@@ -9,10 +9,28 @@ package org.chromium.net;
* {@hide as it's only used internally}
*/
public class ApiVersion {
- public static final String CRONET_VERSION = "@MAJOR@.@MINOR@.@BUILD@.@PATCH@";
- public static final String LAST_CHANGE = "@LASTCHANGE@";
+ private static final String CRONET_VERSION = "@MAJOR@.@MINOR@.@BUILD@.@PATCH@";
+ private static final int API_LEVEL = @API_LEVEL@;
+ private static final String LAST_CHANGE = "@LASTCHANGE@";
- public static String getVersion() {
+ /**
+ * Private constructor. All members of this class should be static.
+ */
+ private ApiVersion() {}
+
+ public static String getCronetVersionWithLastChange() {
return CRONET_VERSION + "@" + LAST_CHANGE.substring(0, 8);
}
+
+ public static int getApiLevel() {
+ return API_LEVEL;
+ }
+
+ public static String getCronetVersion() {
+ return CRONET_VERSION;
+ }
+
+ public static String getLastChange() {
+ return LAST_CHANGE;
+ }
}
« no previous file with comments | « components/cronet/android/api.txt ('k') | components/cronet/android/api/src/org/chromium/net/CronetEngine.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698