Index: components/cronet/android/chromium_url_request_context.cc |
diff --git a/components/cronet/android/chromium_url_request_context.cc b/components/cronet/android/chromium_url_request_context.cc |
index 247077d3b36a57bbb54e0b951607b3ac0884322a..3969ec0cfd99d48b7d797f780afad294b4db1e98 100644 |
--- a/components/cronet/android/chromium_url_request_context.cc |
+++ b/components/cronet/android/chromium_url_request_context.cc |
@@ -66,24 +66,11 @@ static jlong CreateRequestContextAdapter( |
const JavaParamRef<jobject>& jcaller, |
const JavaParamRef<jstring>& juser_agent, |
jint jlog_level, |
- const JavaParamRef<jstring>& jconfig) { |
+ jlong jconfig) { |
std::string user_agent = ConvertJavaStringToUTF8(env, juser_agent); |
- std::string config = ConvertJavaStringToUTF8(env, jconfig); |
- |
- scoped_ptr<base::Value> config_value = base::JSONReader::Read(config); |
- if (!config_value || !config_value->IsType(base::Value::TYPE_DICTIONARY)) { |
- DLOG(ERROR) << "Bad JSON: " << config; |
- return 0; |
- } |
- |
scoped_ptr<URLRequestContextConfig> context_config( |
- new URLRequestContextConfig()); |
- base::JSONValueConverter<URLRequestContextConfig> converter; |
- if (!converter.Convert(*config_value, context_config.get())) { |
- DLOG(ERROR) << "Bad Config: " << config_value; |
- return 0; |
- } |
+ reinterpret_cast<URLRequestContextConfig*>(jconfig)); |
// TODO(mef): MinLogLevel is global, shared by all URLRequestContexts. |
// Revisit this if each URLRequestContext would need an individual log level. |