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

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: Components Refactor + 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 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(const ScopedJavaLocalRef<jstring>& jstring) {
11 if (jstring.is_null())
12 return string16();
13
14 return ConvertJavaStringToUTF16(jstring);
15 }
16
17 void SafeJavaStringArrayToStringVector(
18 const ScopedJavaLocalRef<jobjectArray>& jarray,
19 JNIEnv* env,
20 std::vector<string16>* string_vector) {
21 if (!jarray.is_null()) {
22 base::android::AppendJavaStringArrayToStringVector(env,
23 jarray.obj(),
24 string_vector);
25 }
26 }
27
28 } // namespace android
29 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698