Bug 810794 - Enable to config 'network.cookie.cookieBehavior'. r=mleibovic

This commit is contained in:
Tetsuharu OHZEKI 2012-11-13 18:58:49 -05:00
parent 20326f426f
commit 22a1ee6347
5 changed files with 29 additions and 7 deletions

View File

@ -71,7 +71,12 @@
<!ENTITY pref_do_not_track "Tell sites not to track me">
<!ENTITY pref_telemetry "Send performance data">
<!ENTITY pref_remember_signons "Remember passwords">
<!ENTITY pref_cookies "Enable cookies">
<!ENTITY pref_cookies "Cookies">
<!ENTITY pref_cookies_accept_all "Enabled">
<!ENTITY pref_cookies_not_accept_foreign "Enabled, excluding 3rd party">
<!ENTITY pref_cookies_disabled "Disabled">
<!ENTITY pref_char_encoding "Character encoding">
<!ENTITY pref_char_encoding_on "Show menu">
<!ENTITY pref_char_encoding_off "Don\'t show menu">

View File

@ -37,6 +37,16 @@
<item>true</item>
<item>false</item>
</string-array>
<string-array name="pref_cookies_entries">
<item>@string/pref_cookies_accept_all</item>
<item>@string/pref_cookies_not_accept_foreign</item>
<item>@string/pref_cookies_disabled</item>
</string-array>
<string-array name="pref_cookies_values">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="pref_import_android_entries">
<item>@string/awesomebar_bookmarks_title</item>
<item>@string/awesomebar_history_title</item>

View File

@ -77,9 +77,11 @@
android:defaultValue="true"
android:persistent="false" />
<CheckBoxPreference android:key="network.cookie.cookieBehavior"
android:title="@string/pref_cookies"
android:persistent="false" />
<ListPreference android:key="network.cookie.cookieBehavior"
android:title="@string/pref_cookies"
android:entries="@array/pref_cookies_entries"
android:entryValues="@array/pref_cookies_values"
android:persistent="false" />
#ifdef MOZ_TELEMETRY_REPORTING
<CheckBoxPreference android:key="toolkit.telemetry.enabled"

View File

@ -77,7 +77,12 @@
<string name="pref_do_not_track">&pref_do_not_track;</string>
<string name="pref_telemetry">&pref_telemetry;</string>
<string name="pref_remember_signons">&pref_remember_signons;</string>
<string name="pref_cookies">&pref_cookies;</string>
<string name="pref_cookies_accept_all">&pref_cookies_accept_all;</string>
<string name="pref_cookies_not_accept_foreign">&pref_cookies_not_accept_foreign;</string>
<string name="pref_cookies_disabled">&pref_cookies_disabled;</string>
<string name="pref_char_encoding">&pref_char_encoding;</string>
<string name="pref_char_encoding_on">&pref_char_encoding_on;</string>
<string name="pref_char_encoding_off">&pref_char_encoding_off;</string>

View File

@ -875,8 +875,8 @@ var BrowserApp = {
// preferences to be actual booleans.
switch (prefName) {
case "network.cookie.cookieBehavior":
pref.type = "bool";
pref.value = pref.value == 0;
pref.type = "string";
pref.value = pref.value.toString();
break;
case "font.size.inflation.minTwips":
pref.type = "string";
@ -923,7 +923,7 @@ var BrowserApp = {
switch (json.name) {
case "network.cookie.cookieBehavior":
json.type = "int";
json.value = (json.value ? 0 : 2);
json.value = parseInt(json.value);
break;
case "font.size.inflation.minTwips":
json.type = "int";