Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java

Issue 1266243003: Tweaks to the precache triggering code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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.privacy; 5 package org.chromium.chrome.browser.preferences.privacy;
6 6
7 import android.os.Bundle; 7 import android.os.Bundle;
8 import android.preference.CheckBoxPreference; 8 import android.preference.CheckBoxPreference;
9 import android.preference.Preference; 9 import android.preference.Preference;
10 import android.preference.Preference.OnPreferenceChangeListener; 10 import android.preference.Preference.OnPreferenceChangeListener;
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 if (PREF_SEARCH_SUGGESTIONS.equals(key)) { 188 if (PREF_SEARCH_SUGGESTIONS.equals(key)) {
189 PrefServiceBridge.getInstance().setSearchSuggestEnabled((boolean) ne wValue); 189 PrefServiceBridge.getInstance().setSearchSuggestEnabled((boolean) ne wValue);
190 } else if (PREF_SAFE_BROWSING.equals(key)) { 190 } else if (PREF_SAFE_BROWSING.equals(key)) {
191 PrefServiceBridge.getInstance().setSafeBrowsingEnabled((boolean) new Value); 191 PrefServiceBridge.getInstance().setSafeBrowsingEnabled((boolean) new Value);
192 } else if (PREF_SAFE_BROWSING_EXTENDED_REPORTING.equals(key)) { 192 } else if (PREF_SAFE_BROWSING_EXTENDED_REPORTING.equals(key)) {
193 PrefServiceBridge.getInstance().setSafeBrowsingExtendedReportingEnab led( 193 PrefServiceBridge.getInstance().setSafeBrowsingExtendedReportingEnab led(
194 (boolean) newValue); 194 (boolean) newValue);
195 } else if (PREF_NETWORK_PREDICTIONS.equals(key)) { 195 } else if (PREF_NETWORK_PREDICTIONS.equals(key)) {
196 PrefServiceBridge.getInstance().setNetworkPredictionOptions( 196 PrefServiceBridge.getInstance().setNetworkPredictionOptions(
197 NetworkPredictionOptions.stringToEnum((String) newValue)); 197 NetworkPredictionOptions.stringToEnum((String) newValue));
198 PrecacheLauncher.updatePrecachingEnabled( 198 PrecacheLauncher.updatePrecachingEnabled(getActivity());
199 PrivacyPreferencesManager.getInstance(getActivity()), getAct ivity());
200 } else if (PREF_NETWORK_PREDICTIONS_NO_CELLULAR.equals(key)) { 199 } else if (PREF_NETWORK_PREDICTIONS_NO_CELLULAR.equals(key)) {
201 PrefServiceBridge.getInstance().setNetworkPredictionOptions((boolean ) newValue 200 PrefServiceBridge.getInstance().setNetworkPredictionOptions((boolean ) newValue
202 ? NetworkPredictionOptions.NETWORK_PREDICTION_ALWAYS 201 ? NetworkPredictionOptions.NETWORK_PREDICTION_ALWAYS
203 : NetworkPredictionOptions.NETWORK_PREDICTION_NEVER); 202 : NetworkPredictionOptions.NETWORK_PREDICTION_NEVER);
204 PrecacheLauncher.updatePrecachingEnabled( 203 PrecacheLauncher.updatePrecachingEnabled(getActivity());
205 PrivacyPreferencesManager.getInstance(getActivity()), getAct ivity());
206 } else if (PREF_NAVIGATION_ERROR.equals(key)) { 204 } else if (PREF_NAVIGATION_ERROR.equals(key)) {
207 PrefServiceBridge.getInstance().setResolveNavigationErrorEnabled((bo olean) newValue); 205 PrefServiceBridge.getInstance().setResolveNavigationErrorEnabled((bo olean) newValue);
208 } else if (PREF_CRASH_DUMP_UPLOAD_NO_CELLULAR.equals(key)) { 206 } else if (PREF_CRASH_DUMP_UPLOAD_NO_CELLULAR.equals(key)) {
209 PrefServiceBridge.getInstance().setCrashReporting((boolean) newValue ); 207 PrefServiceBridge.getInstance().setCrashReporting((boolean) newValue );
210 } else if (PREF_CRASH_DUMP_UPLOAD.equals(key)) { 208 } else if (PREF_CRASH_DUMP_UPLOAD.equals(key)) {
211 PrivacyPreferencesManager.getInstance(getActivity()).setUploadCrashD ump( 209 PrivacyPreferencesManager.getInstance(getActivity()).setUploadCrashD ump(
212 (String) newValue); 210 (String) newValue);
213 } 211 }
214 212
215 return true; 213 return true;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 public boolean onOptionsItemSelected(MenuItem item) { 322 public boolean onOptionsItemSelected(MenuItem item) {
325 if (item.getItemId() == R.id.menu_id_help_privacy) { 323 if (item.getItemId() == R.id.menu_id_help_privacy) {
326 HelpAndFeedback.getInstance(getActivity()) 324 HelpAndFeedback.getInstance(getActivity())
327 .show(getActivity(), getString(R.string.help_context_privacy ), 325 .show(getActivity(), getString(R.string.help_context_privacy ),
328 Profile.getLastUsedProfile(), null); 326 Profile.getLastUsedProfile(), null);
329 return true; 327 return true;
330 } 328 }
331 return false; 329 return false;
332 } 330 }
333 } 331 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698