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

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: Fixed assortment of 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) {
11 if (jstring.is_null())
12 return string16();
13
14 return ConvertJavaStringToUTF16(jstring);
15 }
16
17 void SafeJavaStringArrayToStringVector(
18 ScopedJavaLocalRef<jobjectArray> jarray,
19 JNIEnv* env,
20 std::vector<string16>* stringVector) {
Ilya Sherman 2013/03/05 00:42:38 nit: Indent these three lines two more spaces each
Ilya Sherman 2013/03/05 00:42:38 nit: Use hacker_case, not camelCase.
apiccion 2013/03/09 00:53:41 Done.
apiccion 2013/03/09 00:53:41 Done.
21 if (!jarray.is_null()) {
22 base::android::AppendJavaStringArrayToStringVector(env,
23 jarray.obj(),
24 stringVector);
25 }
26 }
27
28 } // namespace android
29 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698