| 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/profiles/profile_manager.h" | 12 #include "chrome/browser/profiles/profile_manager.h" |
| 13 #include "chrome/browser/search_engines/template_url_service.h" |
| 13 #include "chrome/browser/search_engines/template_url_service_factory.h" | 14 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 15 #include "chrome/browser/search_engines/util.h" |
| 14 #include "components/google/core/browser/google_util.h" | 16 #include "components/google/core/browser/google_util.h" |
| 15 #include "components/search_engines/template_url.h" | 17 #include "components/search_engines/template_url.h" |
| 16 #include "components/search_engines/template_url_prepopulate_data.h" | 18 #include "components/search_engines/template_url_prepopulate_data.h" |
| 17 #include "components/search_engines/template_url_service.h" | |
| 18 #include "components/search_engines/util.h" | |
| 19 #include "jni/TemplateUrlService_jni.h" | 19 #include "jni/TemplateUrlService_jni.h" |
| 20 #include "net/base/url_util.h" | 20 #include "net/base/url_util.h" |
| 21 | 21 |
| 22 using base::android::ConvertJavaStringToUTF16; | 22 using base::android::ConvertJavaStringToUTF16; |
| 23 using base::android::ConvertUTF16ToJavaString; | 23 using base::android::ConvertUTF16ToJavaString; |
| 24 using base::android::ConvertUTF8ToJavaString; | 24 using base::android::ConvertUTF8ToJavaString; |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 Profile* GetOriginalProfile() { | 28 Profile* GetOriginalProfile() { |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 static jlong Init(JNIEnv* env, jobject obj) { | 220 static jlong Init(JNIEnv* env, jobject obj) { |
| 221 TemplateUrlServiceAndroid* template_url_service_android = | 221 TemplateUrlServiceAndroid* template_url_service_android = |
| 222 new TemplateUrlServiceAndroid(env, obj); | 222 new TemplateUrlServiceAndroid(env, obj); |
| 223 return reinterpret_cast<intptr_t>(template_url_service_android); | 223 return reinterpret_cast<intptr_t>(template_url_service_android); |
| 224 } | 224 } |
| 225 | 225 |
| 226 // static | 226 // static |
| 227 bool TemplateUrlServiceAndroid::Register(JNIEnv* env) { | 227 bool TemplateUrlServiceAndroid::Register(JNIEnv* env) { |
| 228 return RegisterNativesImpl(env); | 228 return RegisterNativesImpl(env); |
| 229 } | 229 } |
| OLD | NEW |