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

Side by Side Diff: base/android/unguessable_token_android.h

Issue 2468353002: Added UnguessableToken.java . (Closed)
Patch Set: renamed unit test, comments. Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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.
4
5 #ifndef BASE_ANDROID_UNGUESSABLE_TOKEN_ANDROID_H_
6 #define BASE_ANDROID_UNGUESSABLE_TOKEN_ANDROID_H_
7
8 #include <jni.h>
9
10 #include "base/android/scoped_java_ref.h"
11 #include "base/base_export.h"
12 #include "base/unguessable_token.h"
13
14 namespace base {
15 namespace android {
16
17 class BASE_EXPORT UnguessableTokenAndroid {
18 public:
19 // Create a Java UnguessableToken with the same value as |token|.
20 static ScopedJavaLocalRef<jobject> Create(
21 JNIEnv* env,
22 const base::UnguessableToken& token);
23
24 // Create a native UnguessableToken from Java UnguessableToken |token|.
25 static base::UnguessableToken FromJavaUnguessableToken(
26 JNIEnv* env,
27 const JavaRef<jobject>& token);
28
29 // Parcel UnguessableToken |token| and unparcel it, and return the result.
30 // While this method is intended for facilitating unit tests, it results only
31 // in a clone of |token|.
32 static ScopedJavaLocalRef<jobject> ParcelAndUnparcelForTesting(
33 JNIEnv* env,
34 const JavaRef<jobject>& token);
35
36 private:
37 DISALLOW_COPY_AND_ASSIGN(UnguessableTokenAndroid);
38 };
39
40 } // namespace android
41 } // namespace base
42
43 #endif // BASE_ANDROID_UNGUESSABLE_TOKEN_ANDROID_H_
OLDNEW
« no previous file with comments | « base/android/java/src/org/chromium/base/UnguessableToken.java ('k') | base/android/unguessable_token_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698