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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_tamper_detection_unittest.cc

Issue 2146753002: Android: Remove unneeded RegisterNatives() calls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android: Don't require RegisterNatives if there are none Created 4 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 side-by-side diff with in-line comments
Download patch
Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_tamper_detection_unittest.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_tamper_detection_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_tamper_detection_unittest.cc
index ed680d182e7816c3ec6285cecb13cea18264b09a..af8f9017f4f10da1bf6b560b75a6b5e16e7643ac 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_tamper_detection_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_tamper_detection_unittest.cc
@@ -25,11 +25,6 @@
#include "net/http/http_response_headers.h"
#include "testing/gtest/include/gtest/gtest.h"
-#if defined(OS_ANDROID)
-#include "base/android/jni_android.h"
-#include "net/android/network_library.h"
-#endif
-
namespace {
// Calcuates MD5 hash value for a string and then base64 encode it. Testcases
@@ -83,17 +78,6 @@ std::vector<std::string> StringsToVector(const std::string& values) {
return ret;
}
-void InitEnv() {
-#if defined(OS_ANDROID)
- JNIEnv* env = base::android::AttachCurrentThread();
- static bool inited = false;
- if (!inited) {
- net::android::RegisterNetworkLibrary(env);
- inited = true;
- }
-#endif
-}
-
} // namespace
namespace data_reduction_proxy {
@@ -828,8 +812,6 @@ TEST_F(DataReductionProxyTamperDetectionTest, DetectAndReport) {
},
};
- InitEnv();
-
for (size_t i = 0; i < arraysize(test); ++i) {
std::string raw_headers(test[i].raw_header);
ReplaceWithEncodedString(&raw_headers);

Powered by Google App Engine
This is Rietveld 408576698