OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 package org.chromium.chrome.browser.preferences; | 5 package org.chromium.chrome.browser.preferences; |
6 | 6 |
7 import android.content.Intent; | 7 import android.content.Intent; |
8 import android.net.Uri; | 8 import android.net.Uri; |
9 import android.os.Bundle; | 9 import android.os.Bundle; |
10 import android.os.Handler; | 10 import android.os.Handler; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 124 |
125 if (AndroidSyncSettings.isSyncEnabled(getActivity().getApplicationContex
t()) | 125 if (AndroidSyncSettings.isSyncEnabled(getActivity().getApplicationContex
t()) |
126 && syncService.isEngineInitialized() && !syncService.isUsingSeco
ndaryPassphrase() | 126 && syncService.isEngineInitialized() && !syncService.isUsingSeco
ndaryPassphrase() |
127 && ChromeFeatureList.isEnabled(VIEW_PASSWORDS)) { | 127 && ChromeFeatureList.isEnabled(VIEW_PASSWORDS)) { |
128 passwordsPref.setKey(PREF_MANAGE_ACCOUNT_LINK); | 128 passwordsPref.setKey(PREF_MANAGE_ACCOUNT_LINK); |
129 passwordsPref.setTitle(R.string.redirect_to_passwords_text); | 129 passwordsPref.setTitle(R.string.redirect_to_passwords_text); |
130 passwordsPref.setSummary(R.string.redirect_to_passwords_link); | 130 passwordsPref.setSummary(R.string.redirect_to_passwords_link); |
131 passwordsPref.setOnPreferenceClickListener(this); | 131 passwordsPref.setOnPreferenceClickListener(this); |
132 passwordsPref.setManagedPreferenceDelegate(null); | 132 passwordsPref.setManagedPreferenceDelegate(null); |
133 } else { | 133 } else { |
134 if (PasswordUIView.shouldUseSmartLockBranding()) { | 134 passwordsPref.setTitle(getResources().getString(R.string.prefs_saved
_passwords)); |
135 passwordsPref.setTitle(getResources().getString( | |
136 R.string.prefs_smart_lock_for_passwords)); | |
137 } else { | |
138 passwordsPref.setTitle(getResources().getString( | |
139 R.string.prefs_saved_passwords)); | |
140 } | |
141 passwordsPref.setFragment(SavePasswordsPreferences.class.getCanonica
lName()); | 135 passwordsPref.setFragment(SavePasswordsPreferences.class.getCanonica
lName()); |
142 setOnOffSummary(passwordsPref, | 136 setOnOffSummary(passwordsPref, |
143 PrefServiceBridge.getInstance().isRememberPasswordsEnabled()
); | 137 PrefServiceBridge.getInstance().isRememberPasswordsEnabled()
); |
144 passwordsPref.setManagedPreferenceDelegate(mManagedPreferenceDelegat
e); | 138 passwordsPref.setManagedPreferenceDelegate(mManagedPreferenceDelegat
e); |
145 } | 139 } |
146 | 140 |
147 Preference homepagePref = findPreference(PREF_HOMEPAGE); | 141 Preference homepagePref = findPreference(PREF_HOMEPAGE); |
148 if (HomepageManager.shouldShowHomepageSetting()) { | 142 if (HomepageManager.shouldShowHomepageSetting()) { |
149 setOnOffSummary(homepagePref, | 143 setOnOffSummary(homepagePref, |
150 HomepageManager.getInstance(getActivity()).getPrefHomepageEn
abled()); | 144 HomepageManager.getInstance(getActivity()).getPrefHomepageEn
abled()); |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 } | 248 } |
255 }; | 249 }; |
256 } | 250 } |
257 | 251 |
258 private void addBlimpPreferences() { | 252 private void addBlimpPreferences() { |
259 BlimpClientContext blimpClientContext = BlimpClientContextFactory | 253 BlimpClientContext blimpClientContext = BlimpClientContextFactory |
260 .getBlimpClientContextForProfile(Profile.getLastUsedProfile().ge
tOriginalProfile()); | 254 .getBlimpClientContextForProfile(Profile.getLastUsedProfile().ge
tOriginalProfile()); |
261 blimpClientContext.attachBlimpPreferences(this); | 255 blimpClientContext.attachBlimpPreferences(this); |
262 } | 256 } |
263 } | 257 } |
OLD | NEW |