Backed out changeset 0ac99e7e0440 (bug 1222377) for testRestrictions bustage in android rc3

This commit is contained in:
Wes Kocher 2015-12-15 14:11:10 -08:00
parent 2bbfb700b2
commit 038452c032
8 changed files with 3 additions and 29 deletions

View File

@ -12,10 +12,6 @@ package org.mozilla.gecko.restrictions;
public class DefaultConfiguration implements RestrictionConfiguration {
@Override
public boolean isAllowed(Restrictable restrictable) {
if (restrictable == Restrictable.BLOCK_LIST) {
return false;
}
return true;
}

View File

@ -25,8 +25,7 @@ public class GuestProfileConfiguration implements RestrictionConfiguration {
Restrictable.SET_IMAGE,
Restrictable.MODIFY_ACCOUNTS,
Restrictable.REMOTE_DEBUGGING,
Restrictable.IMPORT_SETTINGS,
Restrictable.BLOCK_LIST
Restrictable.IMPORT_SETTINGS
);
@SuppressWarnings("serial")

View File

@ -66,11 +66,7 @@ public enum Restrictable {
CAMERA_MICROPHONE(18, "camera_microphone",
R.string.restrictable_feature_camera_microphone,
R.string.restrictable_feature_camera_microphone_description),
BLOCK_LIST(19, "block_list",
R.string.restrictable_feature_block_list,
R.string.restrictable_feature_block_list_description);
R.string.restrictable_feature_camera_microphone_description);
public final int id;
public final String name;

View File

@ -6,7 +6,6 @@
package org.mozilla.gecko.restrictions;
import org.mozilla.gecko.AboutPages;
import org.mozilla.gecko.AppConstants;
import org.mozilla.gecko.util.ThreadUtils;
import android.annotation.TargetApi;
@ -34,11 +33,6 @@ public class RestrictedProfileConfiguration implements RestrictionConfiguration
configuration.put(Restrictable.ADVANCED_SETTINGS, false);
configuration.put(Restrictable.CAMERA_MICROPHONE, false);
configuration.put(Restrictable.DATA_CHOICES, true);
// Hold behind Nightly flag until we have an actual block list deployed.
if (AppConstants.NIGHTLY_BUILD) {
configuration.put(Restrictable.BLOCK_LIST, false);
}
}
/**

View File

@ -746,8 +746,6 @@ just addresses the organization to follow, e.g. "This site is run by " -->
<!ENTITY restrictable_feature_camera_microphone_description "Allows family members to engage in real time communication on websites.">
<!ENTITY restrictable_feature_data_choices "Data Choices">
<!ENTITY restrictable_feature_data_choices_description "Choose whether or not to send usage information to Mozilla to help make Firefox better.">
<!ENTITY restrictable_feature_block_list "Block List">
<!ENTITY restrictable_feature_block_list_description "Block websites that include sensitive content.">
<!-- Default Bookmarks titles-->
<!-- LOCALIZATION NOTE (bookmarks_about_browser): link title for about:fennec -->

View File

@ -581,8 +581,6 @@
<string name="restrictable_feature_camera_microphone_description">&restrictable_feature_camera_microphone_description;</string>
<string name="restrictable_feature_data_choices">&restrictable_feature_data_choices;</string>
<string name="restrictable_feature_data_choices_description">&restrictable_feature_data_choices_description;</string>
<string name="restrictable_feature_block_list">&restrictable_feature_block_list;</string>
<string name="restrictable_feature_block_list_description">&restrictable_feature_block_list_description;</string>
<!-- Miscellaneous -->
<string name="ellipsis">&ellipsis;</string>

View File

@ -538,12 +538,6 @@ var BrowserApp = {
Services.prefs.setBoolPref("xpinstall.enabled", true);
}
if (ParentalControls.parentalControlsEnabled) {
let isBlockListEnabled = ParentalControls.isAllowed(ParentalControls.BLOCK_LIST);
Services.prefs.setBoolPref("browser.safebrowsing.forbiddenURIs.enabled", isBlockListEnabled);
Services.prefs.setBoolPref("browser.safebrowsing.allowOverride", !isBlockListEnabled);
}
let sysInfo = Cc["@mozilla.org/system-info;1"].getService(Ci.nsIPropertyBag2);
if (sysInfo.get("version") < 16) {
let defaults = Services.prefs.getDefaultBranch(null);

View File

@ -11,7 +11,7 @@ interface nsIFile;
interface nsIInterfaceRequestor;
interface nsIArray;
[scriptable, uuid(f17414cd-d357-476d-b894-2f7bda9e3a9b)]
[scriptable, uuid(f35733bc-114b-49ce-a8dd-a423f19318bc)]
interface nsIParentalControlsService : nsISupports
{
/**
@ -35,7 +35,6 @@ interface nsIParentalControlsService : nsISupports
const short GUEST_BROWSING = 16; // Disallow usage of guest browsing
const short ADVANCED_SETTINGS = 17; // Advanced settings
const short CAMERA_MICROPHONE = 18; // Camera and microphone (WebRTC)
const short BLOCK_LIST = 19; // Block websites that include sensitive content
/**
* @returns true if the current user account has parental controls