Roll src/third_party/WebKit f298044:aa8346d (svn 202628:202629)
[chromium-blink-merge.git] / content / browser / android / load_url_params.cc
blob2f08725dcf177f1adce77e841c49fb3867587eb5
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.
5 #include "content/browser/android/load_url_params.h"
7 #include <jni.h>
9 #include "base/android/jni_string.h"
10 #include "content/public/browser/navigation_controller.h"
11 #include "content/public/common/url_constants.h"
12 #include "jni/LoadUrlParams_jni.h"
13 #include "url/gurl.h"
15 namespace content {
17 bool RegisterLoadUrlParams(JNIEnv* env) {
18 return RegisterNativesImpl(env);
21 jboolean IsDataScheme(JNIEnv* env,
22 const JavaParamRef<jclass>& clazz,
23 const JavaParamRef<jstring>& jurl) {
24 GURL url(base::android::ConvertJavaStringToUTF8(env, jurl));
25 return url.SchemeIs(url::kDataScheme);
28 } // namespace content