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

Side by Side Diff: net/android/gurl_utils.cc

Issue 11416347: Adding java implementation for Geolocation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated comment and copyright date Created 8 years 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) 2012 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 "net/android/gurl_utils.h"
6
7 #include "base/android/jni_string.h"
8 #include "googleurl/src/gurl.h"
9 #include "jni/GURLUtils_jni.h"
10
11 namespace net {
12
13 jstring GetOrigin(JNIEnv* env, jclass clazz, jstring url) {
14 GURL host(base::android::ConvertJavaStringToUTF16(env, url));
15
16 return base::android::ConvertUTF8ToJavaString(env,
17 host.GetOrigin().spec()).Release();
Yaron 2012/12/14 02:09:07 Hmm. You shouldn't need to manager this yourself.
18 }
19
20 bool RegisterGURLUtils(JNIEnv* env) {
21 return RegisterNativesImpl(env);
22 }
23
24 } // net namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698