| 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/format_macros.h" |    8 #include "base/format_macros.h" | 
|    9 #include "base/stringprintf.h" |    9 #include "base/stringprintf.h" | 
|   10 #include "base/utf_string_conversions.h" |   10 #include "base/utf_string_conversions.h" | 
|   11 #include "chrome/browser/browser_process.h" |   11 #include "chrome/browser/browser_process.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.h" |   13 #include "chrome/browser/search_engines/template_url.h" | 
|   14 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" |   14 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" | 
|   15 #include "chrome/browser/search_engines/template_url_service.h" |   15 #include "chrome/browser/search_engines/template_url_service.h" | 
|   16 #include "chrome/browser/search_engines/template_url_service_factory.h" |   16 #include "chrome/browser/search_engines/template_url_service_factory.h" | 
|   17 #include "chrome/common/chrome_notification_types.h" |   17 #include "chrome/common/chrome_notification_types.h" | 
 |   18 #include "content/public/browser/notification_source.h" | 
|   18 #include "jni/TemplateUrlService_jni.h" |   19 #include "jni/TemplateUrlService_jni.h" | 
|   19  |   20  | 
|   20 using base::android::ConvertUTF16ToJavaString; |   21 using base::android::ConvertUTF16ToJavaString; | 
|   21  |   22  | 
|   22 namespace { |   23 namespace { | 
|   23  |   24  | 
|   24 Profile* GetOriginalProfile() { |   25 Profile* GetOriginalProfile() { | 
|   25   return g_browser_process->profile_manager()->GetDefaultProfile()-> |   26   return g_browser_process->profile_manager()->GetDefaultProfile()-> | 
|   26       GetOriginalProfile(); |   27       GetOriginalProfile(); | 
|   27 } |   28 } | 
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  116 static jint Init(JNIEnv* env, jobject obj) { |  117 static jint Init(JNIEnv* env, jobject obj) { | 
|  117   TemplateUrlServiceAndroid* template_url_service_android = |  118   TemplateUrlServiceAndroid* template_url_service_android = | 
|  118       new TemplateUrlServiceAndroid(env, obj); |  119       new TemplateUrlServiceAndroid(env, obj); | 
|  119   return reinterpret_cast<jint>(template_url_service_android); |  120   return reinterpret_cast<jint>(template_url_service_android); | 
|  120 } |  121 } | 
|  121  |  122  | 
|  122 // static |  123 // static | 
|  123 bool TemplateUrlServiceAndroid::Register(JNIEnv* env) { |  124 bool TemplateUrlServiceAndroid::Register(JNIEnv* env) { | 
|  124   return RegisterNativesImpl(env); |  125   return RegisterNativesImpl(env); | 
|  125 } |  126 } | 
| OLD | NEW |