| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/search_engines/template_url_service_android.h" | 5 #include "chrome/browser/search_engines/template_url_service_android.h" |
| 6 | 6 |
| 7 #include "base/android/jni_string.h" | 7 #include "base/android/jni_string.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| 11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 12 #include "chrome/browser/google/google_util.h" | 12 #include "chrome/browser/google/google_util.h" |
| 13 #include "chrome/browser/profiles/profile_manager.h" | 13 #include "chrome/browser/profiles/profile_manager.h" |
| 14 #include "chrome/browser/search_engines/search_terms_data.h" | |
| 15 #include "chrome/browser/search_engines/template_url.h" | 14 #include "chrome/browser/search_engines/template_url.h" |
| 16 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" | 15 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" |
| 17 #include "chrome/browser/search_engines/template_url_service.h" | 16 #include "chrome/browser/search_engines/template_url_service.h" |
| 18 #include "chrome/browser/search_engines/template_url_service_factory.h" | 17 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 19 #include "chrome/browser/search_engines/util.h" | 18 #include "chrome/browser/search_engines/util.h" |
| 20 #include "jni/TemplateUrlService_jni.h" | 19 #include "jni/TemplateUrlService_jni.h" |
| 21 #include "net/base/url_util.h" | 20 #include "net/base/url_util.h" |
| 22 | 21 |
| 23 using base::android::ConvertJavaStringToUTF16; | 22 using base::android::ConvertJavaStringToUTF16; |
| 24 using base::android::ConvertUTF16ToJavaString; | 23 using base::android::ConvertUTF16ToJavaString; |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 static jlong Init(JNIEnv* env, jobject obj) { | 197 static jlong Init(JNIEnv* env, jobject obj) { |
| 199 TemplateUrlServiceAndroid* template_url_service_android = | 198 TemplateUrlServiceAndroid* template_url_service_android = |
| 200 new TemplateUrlServiceAndroid(env, obj); | 199 new TemplateUrlServiceAndroid(env, obj); |
| 201 return reinterpret_cast<intptr_t>(template_url_service_android); | 200 return reinterpret_cast<intptr_t>(template_url_service_android); |
| 202 } | 201 } |
| 203 | 202 |
| 204 // static | 203 // static |
| 205 bool TemplateUrlServiceAndroid::Register(JNIEnv* env) { | 204 bool TemplateUrlServiceAndroid::Register(JNIEnv* env) { |
| 206 return RegisterNativesImpl(env); | 205 return RegisterNativesImpl(env); |
| 207 } | 206 } |
| OLD | NEW |