OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/android/password_ui_view_android.h" | 5 #include "chrome/browser/android/password_ui_view_android.h" |
6 | 6 |
7 #include "base/android/jni_string.h" | 7 #include "base/android/jni_string.h" |
8 #include "base/android/jni_weak_ref.h" | 8 #include "base/android/jni_weak_ref.h" |
9 #include "base/command_line.h" | |
10 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
11 #include "chrome/browser/profiles/profile_manager.h" | 10 #include "chrome/browser/profiles/profile_manager.h" |
12 #include "chrome/browser/sync/profile_sync_service_factory.h" | 11 #include "chrome/browser/sync/profile_sync_service_factory.h" |
13 #include "chrome/common/pref_names.h" | 12 #include "chrome/common/pref_names.h" |
14 #include "components/autofill/core/common/password_form.h" | 13 #include "components/autofill/core/common/password_form.h" |
15 #include "components/browser_sync/browser/profile_sync_service.h" | 14 #include "components/browser_sync/browser/profile_sync_service.h" |
16 #include "components/password_manager/core/browser/affiliation_utils.h" | 15 #include "components/password_manager/core/browser/affiliation_utils.h" |
17 #include "components/password_manager/core/browser/password_bubble_experiment.h" | 16 #include "components/password_manager/core/browser/password_bubble_experiment.h" |
18 #include "components/password_manager/core/browser/password_manager_constants.h" | 17 #include "components/password_manager/core/browser/password_manager_constants.h" |
19 #include "components/password_manager/core/common/experiments.h" | 18 #include "components/password_manager/core/common/experiments.h" |
20 #include "components/password_manager/core/common/password_manager_switches.h" | |
21 #include "components/prefs/pref_service.h" | 19 #include "components/prefs/pref_service.h" |
22 #include "jni/PasswordUIView_jni.h" | 20 #include "jni/PasswordUIView_jni.h" |
23 | 21 |
24 using base::android::ConvertUTF16ToJavaString; | 22 using base::android::ConvertUTF16ToJavaString; |
25 using base::android::ConvertUTF8ToJavaString; | 23 using base::android::ConvertUTF8ToJavaString; |
26 using base::android::ScopedJavaLocalRef; | 24 using base::android::ScopedJavaLocalRef; |
27 | 25 |
28 PasswordUIViewAndroid::PasswordUIViewAndroid(JNIEnv* env, jobject obj) | 26 PasswordUIViewAndroid::PasswordUIViewAndroid(JNIEnv* env, jobject obj) |
29 : password_manager_presenter_(this), weak_java_ui_controller_(env, obj) {} | 27 : password_manager_presenter_(this), weak_java_ui_controller_(env, obj) {} |
30 | 28 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 137 |
140 // static | 138 // static |
141 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { | 139 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { |
142 PasswordUIViewAndroid* controller = new PasswordUIViewAndroid(env, obj); | 140 PasswordUIViewAndroid* controller = new PasswordUIViewAndroid(env, obj); |
143 return reinterpret_cast<intptr_t>(controller); | 141 return reinterpret_cast<intptr_t>(controller); |
144 } | 142 } |
145 | 143 |
146 bool PasswordUIViewAndroid::RegisterPasswordUIViewAndroid(JNIEnv* env) { | 144 bool PasswordUIViewAndroid::RegisterPasswordUIViewAndroid(JNIEnv* env) { |
147 return RegisterNativesImpl(env); | 145 return RegisterNativesImpl(env); |
148 } | 146 } |
OLD | NEW |