OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 package org.chromium.base; | 5 package org.chromium.base; |
6 | 6 |
7 import android.os.Parcel; | 7 import android.os.Parcel; |
8 import android.os.Parcelable; | 8 import android.os.Parcelable; |
9 | 9 |
10 import org.chromium.base.annotations.CalledByNative; | 10 import org.chromium.base.annotations.CalledByNative; |
(...skipping 15 matching lines...) Expand all Loading... | |
26 mHigh = high; | 26 mHigh = high; |
27 mLow = low; | 27 mLow = low; |
28 } | 28 } |
29 | 29 |
30 @CalledByNative | 30 @CalledByNative |
31 private static UnguessableToken create(long high, long low) { | 31 private static UnguessableToken create(long high, long low) { |
32 return new UnguessableToken(high, low); | 32 return new UnguessableToken(high, low); |
33 } | 33 } |
34 | 34 |
35 @CalledByNative | 35 @CalledByNative |
36 private long getHighForSerialization() { | 36 public long getHighForSerialization() { |
boliu
2017/04/22 00:22:42
I think you should be using use native FromJavaUng
liberato (no reviews please)
2017/04/24 22:19:41
i don't see how to convert from java or native Ung
| |
37 return mHigh; | 37 return mHigh; |
38 } | 38 } |
39 | 39 |
40 @CalledByNative | 40 @CalledByNative |
41 private long getLowForSerialization() { | 41 public long getLowForSerialization() { |
42 return mLow; | 42 return mLow; |
43 } | 43 } |
44 | 44 |
45 @Override | 45 @Override |
46 public int describeContents() { | 46 public int describeContents() { |
47 return 0; | 47 return 0; |
48 } | 48 } |
49 | 49 |
50 @Override | 50 @Override |
51 public void writeToParcel(Parcel dest, int flags) { | 51 public void writeToParcel(Parcel dest, int flags) { |
(...skipping 30 matching lines...) Expand all Loading... | |
82 writeToParcel(parcel, 0); | 82 writeToParcel(parcel, 0); |
83 | 83 |
84 // Rewind the parcel and un-parcel. | 84 // Rewind the parcel and un-parcel. |
85 parcel.setDataPosition(0); | 85 parcel.setDataPosition(0); |
86 UnguessableToken token = CREATOR.createFromParcel(parcel); | 86 UnguessableToken token = CREATOR.createFromParcel(parcel); |
87 parcel.recycle(); | 87 parcel.recycle(); |
88 | 88 |
89 return token; | 89 return token; |
90 } | 90 } |
91 }; | 91 }; |
OLD | NEW |