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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/format_macros.h" | 11 #include "base/format_macros.h" |
| 12 #include "base/memory/ptr_util.h" |
12 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
13 #include "chrome/browser/profiles/profile_manager.h" | 14 #include "chrome/browser/profiles/profile_manager.h" |
14 #include "chrome/browser/search_engines/template_url_service_factory.h" | 15 #include "chrome/browser/search_engines/template_url_service_factory.h" |
15 #include "components/google/core/browser/google_util.h" | 16 #include "components/google/core/browser/google_util.h" |
16 #include "components/search_engines/search_terms_data.h" | 17 #include "components/search_engines/search_terms_data.h" |
17 #include "components/search_engines/template_url.h" | 18 #include "components/search_engines/template_url.h" |
18 #include "components/search_engines/template_url_prepopulate_data.h" | 19 #include "components/search_engines/template_url_prepopulate_data.h" |
19 #include "components/search_engines/template_url_service.h" | 20 #include "components/search_engines/template_url_service.h" |
20 #include "components/search_engines/util.h" | 21 #include "components/search_engines/util.h" |
21 #include "jni/TemplateUrlService_jni.h" | 22 #include "jni/TemplateUrlService_jni.h" |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { | 349 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { |
349 TemplateUrlServiceAndroid* template_url_service_android = | 350 TemplateUrlServiceAndroid* template_url_service_android = |
350 new TemplateUrlServiceAndroid(env, obj); | 351 new TemplateUrlServiceAndroid(env, obj); |
351 return reinterpret_cast<intptr_t>(template_url_service_android); | 352 return reinterpret_cast<intptr_t>(template_url_service_android); |
352 } | 353 } |
353 | 354 |
354 // static | 355 // static |
355 bool TemplateUrlServiceAndroid::Register(JNIEnv* env) { | 356 bool TemplateUrlServiceAndroid::Register(JNIEnv* env) { |
356 return RegisterNativesImpl(env); | 357 return RegisterNativesImpl(env); |
357 } | 358 } |
OLD | NEW |