| 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" | 9 #include "base/command_line.h" |
| 10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 password_manager_presenter_.RemovePasswordException(index); | 110 password_manager_presenter_.RemovePasswordException(index); |
| 111 } | 111 } |
| 112 | 112 |
| 113 ScopedJavaLocalRef<jstring> GetAccountDashboardURL( | 113 ScopedJavaLocalRef<jstring> GetAccountDashboardURL( |
| 114 JNIEnv* env, | 114 JNIEnv* env, |
| 115 const JavaParamRef<jclass>&) { | 115 const JavaParamRef<jclass>&) { |
| 116 return ConvertUTF8ToJavaString(env, | 116 return ConvertUTF8ToJavaString(env, |
| 117 chrome::kPasswordManagerAccountDashboardURL); | 117 chrome::kPasswordManagerAccountDashboardURL); |
| 118 } | 118 } |
| 119 | 119 |
| 120 static jboolean ShouldDisplayManageAccountLink(JNIEnv* env, | |
| 121 const JavaParamRef<jclass>&) { | |
| 122 return password_manager::ManageAccountLinkExperimentEnabled(); | |
| 123 } | |
| 124 | |
| 125 static jboolean ShouldUseSmartLockBranding(JNIEnv* env, | 120 static jboolean ShouldUseSmartLockBranding(JNIEnv* env, |
| 126 const JavaParamRef<jclass>&) { | 121 const JavaParamRef<jclass>&) { |
| 127 const ProfileSyncService* sync_service = | 122 const ProfileSyncService* sync_service = |
| 128 ProfileSyncServiceFactory::GetForProfile( | 123 ProfileSyncServiceFactory::GetForProfile( |
| 129 ProfileManager::GetLastUsedProfile()); | 124 ProfileManager::GetLastUsedProfile()); |
| 130 return password_bubble_experiment::IsSmartLockBrandingEnabled(sync_service); | 125 return password_bubble_experiment::IsSmartLockBrandingEnabled(sync_service); |
| 131 } | 126 } |
| 132 | 127 |
| 133 // static | 128 // static |
| 134 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { | 129 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { |
| 135 PasswordUIViewAndroid* controller = new PasswordUIViewAndroid(env, obj); | 130 PasswordUIViewAndroid* controller = new PasswordUIViewAndroid(env, obj); |
| 136 return reinterpret_cast<intptr_t>(controller); | 131 return reinterpret_cast<intptr_t>(controller); |
| 137 } | 132 } |
| 138 | 133 |
| 139 bool PasswordUIViewAndroid::RegisterPasswordUIViewAndroid(JNIEnv* env) { | 134 bool PasswordUIViewAndroid::RegisterPasswordUIViewAndroid(JNIEnv* env) { |
| 140 return RegisterNativesImpl(env); | 135 return RegisterNativesImpl(env); |
| 141 } | 136 } |
| OLD | NEW |