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

Unified Diff: components/cronet/android/org_chromium_net_UrlRequestContext.cc

Issue 344793006: Generate Cronet Version.java based on VERSION and LASTCHANGE files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Matt's comments. Created 6 years, 6 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/org_chromium_net_UrlRequestContext.cc
diff --git a/components/cronet/android/org_chromium_net_UrlRequestContext.cc b/components/cronet/android/org_chromium_net_UrlRequestContext.cc
index 375300a8cc916f6b2161b45a2642e7c519b975df..689580aaaace0824b1f6c96a6c9aae7109a733af 100644
--- a/components/cronet/android/org_chromium_net_UrlRequestContext.cc
+++ b/components/cronet/android/org_chromium_net_UrlRequestContext.cc
@@ -18,13 +18,8 @@
#include "components/cronet/url_request_context_config.h"
#include "jni/UrlRequestContext_jni.h"
-// Version of this build of Chromium NET.
-#define CHROMIUM_NET_VERSION "1"
-
namespace {
-const char kVersion[] = CHROMIUM_VERSION "/" CHROMIUM_NET_VERSION;
-
// Delegate of URLRequestContextPeer that delivers callbacks to the Java layer.
class JniURLRequestContextPeerDelegate
: public cronet::URLRequestContextPeer::URLRequestContextPeerDelegate {
@@ -60,10 +55,6 @@ bool UrlRequestContextRegisterJni(JNIEnv* env) {
return RegisterNativesImpl(env);
}
-static jstring GetVersion(JNIEnv* env, jclass unused) {
- return base::android::ConvertUTF8ToJavaString(env, kVersion).Release();
-}
-
// Sets global user-agent to be used for all subsequent requests.
static jlong CreateRequestContextPeer(JNIEnv* env,
jobject object,
@@ -101,8 +92,7 @@ static jlong CreateRequestContextPeer(JNIEnv* env,
URLRequestContextPeer* peer = new URLRequestContextPeer(
new JniURLRequestContextPeerDelegate(env, object),
user_agent_string,
- logging_level,
- kVersion);
+ logging_level);
peer->AddRef(); // Hold onto this ref-counted object.
peer->Initialize(context_config.Pass());
return reinterpret_cast<jlong>(peer);

Powered by Google App Engine
This is Rietveld 408576698