Commit 1bfbebf5 authored by Nicolas Ouellet-payeur's avatar Nicolas Ouellet-payeur Committed by Commit Bot

Don't persist "Never translate this site" blacklist in incognito.

For privacy reasons, we don't want the blacklist to be persisted after the user
leaves incognito mode (as this info could reveal a website that was visited in
incognito).

With this patch, adding a website to the blacklist makes it work for the
incognito browsing session, but only saves those websites in memory. Closing the
incognito discards the changes to the blacklist, and the main browsing session
is not affected.

Bug: 793925
Change-Id: Icdd35e86b8b807c6a639c5c6ba86786f912e1bd0
Reviewed-on: https://chromium-review.googlesource.com/1110259
Commit-Queue: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
Reviewed-by: default avatarBernhard Bauer <bauerb@chromium.org>
Reviewed-by: default avataranthonyvd <anthonyvd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569349}
parent faa3fd25
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/common/pref_names.h" #include "chrome/common/pref_names.h"
#include "components/sync_preferences/pref_service_syncable.h" #include "components/sync_preferences/pref_service_syncable.h"
#include "components/translate/core/browser/translate_prefs.h"
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
#include "components/proxy_config/proxy_config_pref_names.h" #include "components/proxy_config/proxy_config_pref_names.h"
...@@ -40,6 +41,8 @@ CreateIncognitoPrefServiceSyncable( ...@@ -40,6 +41,8 @@ CreateIncognitoPrefServiceSyncable(
overlay_pref_names.push_back(prefs::kBrowserWindowPlacement); overlay_pref_names.push_back(prefs::kBrowserWindowPlacement);
overlay_pref_names.push_back(prefs::kMediaRouterTabMirroringSources); overlay_pref_names.push_back(prefs::kMediaRouterTabMirroringSources);
overlay_pref_names.push_back(prefs::kSaveFileDefaultDirectory); overlay_pref_names.push_back(prefs::kSaveFileDefaultDirectory);
overlay_pref_names.push_back(
translate::TranslatePrefs::kPrefTranslateSiteBlacklist);
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
overlay_pref_names.push_back(proxy_config::prefs::kProxy); overlay_pref_names.push_back(proxy_config::prefs::kProxy);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment