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

Side by Side Diff: base/android/jni_local_ref_extensions.cc

Issue 12282004: Added personal_data_manager android implementation for auto-populating auto-fill on android builds … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Autofill nits Created 7 years, 9 months 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 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 #include "base/android/jni_local_ref_extensions.h"
6
7 namespace base {
8 namespace android {
9
10 string16 SafeJavaStringToUTF16(ScopedJavaLocalRef<jstring> jstring) {
Ilya Sherman 2013/03/01 01:55:04 nit: Please make the order of definitions in the i
apiccion 2013/03/02 03:37:01 Done.
11 if (!jstring.is_null()) {
12 return ConvertJavaStringToUTF16(jstring);
13 } else {
14 return string16();
15 }
Ilya Sherman 2013/03/01 01:55:04 nit: Please write this function like so: if (jstr
apiccion 2013/03/02 03:37:01 Done.
16 }
17
18 std::vector<string16> SafeJavaStringArrayToStringVector(
19 ScopedJavaLocalRef<jobjectArray> jarray,
20 JNIEnv* env) {
21 std::vector<string16> stringVector;
22 if (!jarray.is_null()) {
23 base::android::AppendJavaStringArrayToStringVector(env,
24 jarray.obj(),
25 &stringVector);
26 }
27 return stringVector;
28 }
29
30 } // namespace android
31 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698