Bug 971743 - Do not clear the download history with the browsing history. r=wesj

This commit is contained in:
Christian Ascheberg 2014-04-14 00:02:34 +03:00
parent 0b89ba10e9
commit 374b91222a
7 changed files with 10 additions and 34 deletions

View File

@ -156,14 +156,14 @@ size. -->
<!ENTITY pref_sync "Sync">
<!ENTITY pref_search_suggestions "Show search suggestions">
<!ENTITY pref_import_android "Import from Android">
<!ENTITY pref_private_data_history "Browsing &amp; download history">
<!ENTITY pref_private_data_history2 "Browsing history">
<!ENTITY pref_private_data_formdata "Form &amp; search history">
<!ENTITY pref_private_data_cookies2 "Cookies &amp; active logins">
<!ENTITY pref_private_data_passwords "Saved passwords">
<!ENTITY pref_private_data_cache "Cache">
<!ENTITY pref_private_data_offlineApps "Offline website data">
<!ENTITY pref_private_data_siteSettings2 "Site settings">
<!ENTITY pref_private_data_downloadFiles "Downloaded files">
<!ENTITY pref_private_data_downloadFiles2 "Downloads">
<!ENTITY pref_about_firefox "About &brandShortName;">

View File

@ -78,8 +78,8 @@
<item>android_import.data.history</item>
</string-array>
<string-array name="pref_private_data_entries">
<item>@string/pref_private_data_history</item>
<item>@string/pref_private_data_downloadFiles</item>
<item>@string/pref_private_data_history2</item>
<item>@string/pref_private_data_downloadFiles2</item>
<item>@string/pref_private_data_formdata</item>
<item>@string/pref_private_data_cookies2</item>
<item>@string/pref_private_data_passwords</item>
@ -98,7 +98,7 @@
<item>true</item>
</string-array>
<string-array name="pref_private_data_keys">
<item>private.data.history_downloads</item>
<item>private.data.history</item>
<item>private.data.downloadFiles</item>
<item>private.data.formdata</item>
<item>private.data.cookies_sessions</item>

View File

@ -167,14 +167,14 @@
<string name="pref_show_product_announcements">&pref_show_product_announcements;</string>
<string name="pref_sync">&pref_sync;</string>
<string name="pref_search_suggestions">&pref_search_suggestions;</string>
<string name="pref_private_data_history">&pref_private_data_history;</string>
<string name="pref_private_data_history2">&pref_private_data_history2;</string>
<string name="pref_private_data_formdata">&pref_private_data_formdata;</string>
<string name="pref_private_data_cookies2">&pref_private_data_cookies2;</string>
<string name="pref_private_data_passwords">&pref_private_data_passwords;</string>
<string name="pref_private_data_cache">&pref_private_data_cache;</string>
<string name="pref_private_data_offlineApps">&pref_private_data_offlineApps;</string>
<string name="pref_private_data_siteSettings">&pref_private_data_siteSettings2;</string>
<string name="pref_private_data_downloadFiles">&pref_private_data_downloadFiles;</string>
<string name="pref_private_data_downloadFiles2">&pref_private_data_downloadFiles2;</string>
<string name="pref_import_android">&pref_import_android;</string>
<string name="pref_update_autodownload">&pref_update_autodownload2;</string>
<string name="pref_update_autodownload_wifi">&pref_update_autodownload_wifi;</string>

View File

@ -141,7 +141,7 @@ public class testMasterPassword extends PixelTest {
// Look for the 'Settings' menu if this device/OS uses it
selectSettingsItem("Privacy", "Clear private data");
waitForText("Browsing & download history"); // Make sure the Clear private data pop-up is displayed
waitForText("Browsing history"); // Make sure the Clear private data pop-up is displayed
Actions.EventExpecter clearPrivateDataEventExpecter = mActions.expectGeckoEvent("Sanitize:Finished");
if (mSolo.searchText("Clear data") && !mSolo.searchText("Cookies")) {
mSolo.clickOnText("^Clear data$");
@ -149,7 +149,7 @@ public class testMasterPassword extends PixelTest {
} else { // For some reason the pop-up was not opened
if (mSolo.searchText("Cookies")) {
mSolo.clickOnText("^Clear private data$");
waitForText("Browsing & download history"); // Make sure the Clear private data pop-up is displayed
waitForText("Browsing history"); // Make sure the Clear private data pop-up is displayed
mSolo.clickOnText("^Clear data$");
clearPrivateDataEventExpecter.blockForEvent();
} else {

View File

@ -61,7 +61,7 @@ public class testSettingsMenuItems extends PixelTest {
{ "Cookies", "Enabled", "Enabled, excluding 3rd party", "Disabled" },
{ "Remember passwords" },
{ "Use master password" },
{ "Clear private data", "", "Browsing & download history", "Downloaded files", "Form & search history", "Cookies & active logins", "Saved passwords", "Cache", "Offline website data", "Site settings", "Clear data" },
{ "Clear private data", "", "Browsing history", "Downloads", "Form & search history", "Cookies & active logins", "Saved passwords", "Cache", "Offline website data", "Site settings", "Clear data" },
};
// Mozilla/vendor menu items.

View File

@ -1306,16 +1306,6 @@ var BrowserApp = {
try {
switch (key) {
case "history_downloads":
Sanitizer.clearItem("history");
// If we're also removing downloaded files, don't clear the
// download history yet since it will be handled when the files are
// removed.
if (!json["downloadFiles"]) {
Sanitizer.clearItem("downloads");
}
break;
case "cookies_sessions":
Sanitizer.clearItem("cookies");
Sanitizer.clearItem("sessions");

View File

@ -177,20 +177,6 @@ Sanitizer.prototype = {
}
},
downloads: {
clear: function ()
{
downloads.iterate(function (dl) {
dl.remove();
});
},
get canClear()
{
return downloads.canClear;
}
},
downloadFiles: {
clear: function ()
{