ServiceWorker: Consolidate version manipulation functions in SWProviderContext
[chromium-blink-merge.git] / sync / test / fake_server / android / fake_server_helper_android.h
blob24e1d9e182312388080bba777e4eb3cc3477e746
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef SYNC_TEST_FAKE_SERVER_ANDROID_FAKE_SERVER_HELPER_ANDROID
6 #define SYNC_TEST_FAKE_SERVER_ANDROID_FAKE_SERVER_HELPER_ANDROID
8 #include <jni.h>
10 #include "base/basictypes.h"
12 // Helper for utilizing native FakeServer infrastructure in Android tests.
13 class FakeServerHelperAndroid {
14 public:
15 // Registers the native methods.
16 static bool Register(JNIEnv* env);
18 // Creates a FakeServerHelperAndroid.
19 FakeServerHelperAndroid(JNIEnv* env, jobject obj);
21 // Factory method for creating a native FakeServer object. The caller assumes
22 // ownership.
23 jlong CreateFakeServer(JNIEnv* env, jobject obj);
25 // Factory method for creating a native NetworkResources object. The caller
26 // assumes ownership.
27 jlong CreateNetworkResources(JNIEnv* env, jobject obj, jlong fake_server);
29 // Deletes the given |fake_server| (a FakeServer pointer created via
30 // CreateFakeServer).
31 void DeleteFakeServer(JNIEnv* env, jobject obj, jlong fake_server);
33 private:
34 virtual ~FakeServerHelperAndroid();
37 #endif // SYNC_TEST_FAKE_SERVER_ANDROID_FAKE_SERVER_HELPER_ANDROID