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

Unified Diff: content/shell/android/linker_test_apk/src/org/chromium/content_linker_test_apk/LinkerTests.java

Issue 141223002: Move the android library loader from content to base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix final nits Created 6 years, 10 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: content/shell/android/linker_test_apk/src/org/chromium/content_linker_test_apk/LinkerTests.java
diff --git a/content/shell/android/linker_test_apk/src/org/chromium/content_linker_test_apk/LinkerTests.java b/content/shell/android/linker_test_apk/src/org/chromium/content_linker_test_apk/LinkerTests.java
deleted file mode 100644
index 6713643e4e5a97771fceb530baec06f87dbcd3b1..0000000000000000000000000000000000000000
--- a/content/shell/android/linker_test_apk/src/org/chromium/content_linker_test_apk/LinkerTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.content_linker_test_apk;
-
-import android.util.Log;
-
-import org.chromium.base.JNINamespace;
-import org.chromium.content.app.Linker;
-
-// A class that is only used in linker test APK to perform runtime checks
-// in the current process.
-@JNINamespace("content")
-public class LinkerTests implements Linker.TestRunner {
- private static final String TAG = "LinkerTests";
-
- public LinkerTests() {}
-
- public boolean runChecks(int memoryDeviceConfig,
- boolean isBrowserProcess) {
- boolean checkSharedRelro;
- if (isBrowserProcess) {
- switch (Linker.BROWSER_SHARED_RELRO_CONFIG) {
- case Linker.BROWSER_SHARED_RELRO_CONFIG_NEVER:
- checkSharedRelro = false;
- break;
- case Linker.BROWSER_SHARED_RELRO_CONFIG_LOW_RAM_ONLY:
- // A shared RELRO should only be used on low-end devices.
- checkSharedRelro =
- (memoryDeviceConfig == Linker.MEMORY_DEVICE_CONFIG_LOW);
- break;
- case Linker.BROWSER_SHARED_RELRO_CONFIG_ALWAYS:
- // Always check for a shared RELRO.
- checkSharedRelro = true;
- break;
- default:
- Log.e(TAG, "Invalid shared RELRO linker configuration: " +
- Linker.BROWSER_SHARED_RELRO_CONFIG);
- return false;
- }
- } else {
- // Service processes should always use a shared RELRO section.
- checkSharedRelro = true;
- }
-
- if (checkSharedRelro)
- return nativeCheckForSharedRelros(isBrowserProcess);
- else
- return nativeCheckForNoSharedRelros(isBrowserProcess);
- }
-
- // Check that there are shared RELRO sections in the current process,
- // and that they are properly mapped read-only. Returns true on success.
- private static native boolean nativeCheckForSharedRelros(boolean isBrowserProcess);
-
- // Check that there are no shared RELRO sections in the current process,
- // return true on success.
- private static native boolean nativeCheckForNoSharedRelros(boolean isBrowserProcess);
-
-}

Powered by Google App Engine
This is Rietveld 408576698