OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef SYNC_TEST_FAKE_SERVER_ANDROID_FAKE_SERVER_HELPER_ANDROID | 5 #ifndef SYNC_TEST_FAKE_SERVER_ANDROID_FAKE_SERVER_HELPER_ANDROID |
6 #define SYNC_TEST_FAKE_SERVER_ANDROID_FAKE_SERVER_HELPER_ANDROID | 6 #define SYNC_TEST_FAKE_SERVER_ANDROID_FAKE_SERVER_HELPER_ANDROID |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 jobject obj, | 107 jobject obj, |
108 jlong fake_server); | 108 jlong fake_server); |
109 | 109 |
110 // Deletes an entity on the server. This is the JNI way of injecting a | 110 // Deletes an entity on the server. This is the JNI way of injecting a |
111 // tombstone. | 111 // tombstone. |
112 void DeleteEntity(JNIEnv* env, | 112 void DeleteEntity(JNIEnv* env, |
113 jobject obj, | 113 jobject obj, |
114 jlong fake_server, | 114 jlong fake_server, |
115 jstring id); | 115 jstring id); |
116 | 116 |
| 117 // Simulates a dashboard stop and clear. |
| 118 void ClearServerData(JNIEnv* env, jobject obj, jlong fake_server); |
| 119 |
117 private: | 120 private: |
118 virtual ~FakeServerHelperAndroid(); | 121 virtual ~FakeServerHelperAndroid(); |
119 | 122 |
120 // Deserializes |serialized_entity_specifics| into |entity_specifics|. | 123 // Deserializes |serialized_entity_specifics| into |entity_specifics|. |
121 void DeserializeEntitySpecifics(JNIEnv* env, | 124 void DeserializeEntitySpecifics(JNIEnv* env, |
122 jbyteArray serialized_entity_specifics, | 125 jbyteArray serialized_entity_specifics, |
123 sync_pb::EntitySpecifics& entity_specifics); | 126 sync_pb::EntitySpecifics& entity_specifics); |
124 | 127 |
125 // Creates a bookmark entity. | 128 // Creates a bookmark entity. |
126 scoped_ptr<fake_server::FakeServerEntity> CreateBookmarkEntity( | 129 scoped_ptr<fake_server::FakeServerEntity> CreateBookmarkEntity( |
127 JNIEnv* env, | 130 JNIEnv* env, |
128 jstring title, | 131 jstring title, |
129 jstring url, | 132 jstring url, |
130 jstring parent_id); | 133 jstring parent_id); |
131 }; | 134 }; |
132 | 135 |
133 #endif // SYNC_TEST_FAKE_SERVER_ANDROID_FAKE_SERVER_HELPER_ANDROID | 136 #endif // SYNC_TEST_FAKE_SERVER_ANDROID_FAKE_SERVER_HELPER_ANDROID |
OLD | NEW |