forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
heap_profiling_test_shim.h
35 lines (28 loc) · 1.19 KB
/
heap_profiling_test_shim.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright 2017 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.
#ifndef COMPONENTS_HEAP_PROFILING_HEAP_PROFILING_TEST_SHIM_H_
#define COMPONENTS_HEAP_PROFILING_HEAP_PROFILING_TEST_SHIM_H_
#include "base/android/jni_android.h"
#include "base/android/scoped_java_ref.h"
#include "base/macros.h"
// This class implements the native methods of HeapProfilingTestShim.java, and
// acts as a bridge to TestDriver. Note that this class is only used for
// testing.
class HeapProfilingTestShim {
public:
HeapProfilingTestShim(JNIEnv* env, jobject obj);
void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
jboolean RunTestForMode(
JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj,
const base::android::JavaParamRef<jstring>& mode,
jboolean dynamically_start_profiling,
const base::android::JavaParamRef<jstring>& stack_mode,
jboolean should_sample,
jboolean sample_everything);
private:
~HeapProfilingTestShim();
DISALLOW_COPY_AND_ASSIGN(HeapProfilingTestShim);
};
#endif // COMPONENTS_HEAP_PROFILING_HEAP_PROFILING_TEST_SHIM_H_