Add-history-support-in-incognito-mode.patch
This commit is contained in:
parent
ef024506bd
commit
2201c5c531
1 changed files with 25 additions and 38 deletions
|
@ -2,18 +2,10 @@ From: uazo <uazo@users.noreply.github.com>
|
|||
Date: Fri, 7 Aug 2020 16:33:47 +0000
|
||||
Subject: Add history support in incognito mode
|
||||
|
||||
FILE:Add-history-support-in-incognito-mode.patch
|
||||
---
|
||||
.../java/res/xml/privacy_preferences.xml | 5 +++++
|
||||
.../privacy/settings/PrivacySettings.java | 19 +++++++++++++++++++
|
||||
chrome/browser/history/history_tab_helper.cc | 16 ++++++++++++++++
|
||||
chrome/browser/history/history_tab_helper.h | 4 ++++
|
||||
chrome/browser/prefs/browser_prefs.cc | 3 +++
|
||||
.../strings/android_chrome_strings.grd | 6 ++++++
|
||||
chrome/common/pref_names.cc | 5 +++++
|
||||
chrome/common/pref_names.h | 4 ++++
|
||||
8 files changed, 62 insertions(+)
|
||||
|
||||
diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
index 483e36a810..b5cddb590b 100644
|
||||
--- a/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
+++ b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
@@ -32,6 +32,11 @@
|
||||
|
@ -29,18 +21,10 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi
|
|||
android:fragment="org.chromium.chrome.browser.privacy.settings.DoNotTrackSettings"
|
||||
android:key="do_not_track"
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
index 8e78b57fe9..bb5f9af34e 100644
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
@@ -38,6 +38,8 @@ import org.chromium.components.user_prefs.UserPrefs;
|
||||
import org.chromium.ui.text.NoUnderlineClickableSpan;
|
||||
import org.chromium.ui.text.SpanApplier;
|
||||
|
||||
+import org.chromium.base.Log;
|
||||
+
|
||||
/**
|
||||
* Fragment to keep track of the all the privacy related preferences.
|
||||
*/
|
||||
@@ -52,11 +54,13 @@ public class PrivacySettings
|
||||
@@ -55,11 +55,13 @@ public class PrivacySettings
|
||||
private static final String PREF_ALWAYS_INCOGNITO = "always_incognito";
|
||||
public static final String PREF_ALLOW_CUSTOM_TAB_INTENTS = "allow_custom_tab_intents";
|
||||
private static final String PREF_PROXY_OPTIONS = "proxy";
|
||||
|
@ -48,13 +32,13 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
|
|||
|
||||
private static final String[] NEW_PRIVACY_PREFERENCE_ORDER = {PREF_CLEAR_BROWSING_DATA,
|
||||
PREF_CAN_MAKE_PAYMENT, PREF_NETWORK_PREDICTIONS,
|
||||
PREF_SECURE_DNS, PREF_DO_NOT_TRACK,
|
||||
PREF_SECURE_DNS, PREF_DO_NOT_TRACK, PREF_PRIVACY_SANDBOX,
|
||||
PREF_ALWAYS_INCOGNITO,
|
||||
+ PREF_INCOGNITO_TAB_HISTORY_ENABLED,
|
||||
PREF_ALLOW_CUSTOM_TAB_INTENTS,
|
||||
PREF_CLOSE_TABS_ON_EXIT,
|
||||
PREF_PROXY_OPTIONS
|
||||
@@ -99,6 +103,11 @@ public class PrivacySettings
|
||||
@@ -107,6 +109,11 @@ public class PrivacySettings
|
||||
Preference secureDnsPref = findPreference(PREF_SECURE_DNS);
|
||||
secureDnsPref.setVisible(SecureDnsSettings.isUiEnabled());
|
||||
|
||||
|
@ -66,7 +50,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
|
|||
updateSummaries();
|
||||
}
|
||||
|
||||
@@ -118,6 +127,9 @@ public class PrivacySettings
|
||||
@@ -127,6 +134,9 @@ public class PrivacySettings
|
||||
SharedPreferences.Editor sharedPreferencesEditor = ContextUtils.getAppSharedPreferences().edit();
|
||||
sharedPreferencesEditor.putBoolean(PREF_ALLOW_CUSTOM_TAB_INTENTS, (boolean)newValue);
|
||||
sharedPreferencesEditor.apply();
|
||||
|
@ -76,7 +60,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
|
|||
}
|
||||
|
||||
return true;
|
||||
@@ -162,6 +174,13 @@ public class PrivacySettings
|
||||
@@ -171,6 +181,13 @@ public class PrivacySettings
|
||||
(ChromeSwitchPreference) findPreference(PREF_CLOSE_TABS_ON_EXIT);
|
||||
closeTabsOnExitPref.setOnPreferenceChangeListener(this);
|
||||
closeTabsOnExitPref.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
|
||||
|
@ -91,6 +75,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
|
|||
|
||||
private ChromeManagedPreferenceDelegate createManagedPreferenceDelegate() {
|
||||
diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/history/history_tab_helper.cc
|
||||
index 10691cfe40..394f10cc0f 100644
|
||||
--- a/chrome/browser/history/history_tab_helper.cc
|
||||
+++ b/chrome/browser/history/history_tab_helper.cc
|
||||
@@ -28,6 +28,9 @@
|
||||
|
@ -103,7 +88,7 @@ diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/histo
|
|||
#else
|
||||
#include "chrome/browser/ui/browser.h"
|
||||
#include "chrome/browser/ui/browser_finder.h"
|
||||
@@ -255,6 +258,13 @@ void HistoryTabHelper::TitleWasSet(NavigationEntry* entry) {
|
||||
@@ -258,6 +261,13 @@ void HistoryTabHelper::TitleWasSet(NavigationEntry* entry) {
|
||||
history::HistoryService* HistoryTabHelper::GetHistoryService() {
|
||||
Profile* profile =
|
||||
Profile::FromBrowserContext(web_contents()->GetBrowserContext());
|
||||
|
@ -117,7 +102,7 @@ diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/histo
|
|||
if (profile->IsOffTheRecord())
|
||||
return NULL;
|
||||
|
||||
@@ -262,6 +272,12 @@ history::HistoryService* HistoryTabHelper::GetHistoryService() {
|
||||
@@ -265,6 +275,12 @@ history::HistoryService* HistoryTabHelper::GetHistoryService() {
|
||||
profile, ServiceAccessType::IMPLICIT_ACCESS);
|
||||
}
|
||||
|
||||
|
@ -131,6 +116,7 @@ diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/histo
|
|||
// We update the history for this URL.
|
||||
WebContents* tab = web_contents();
|
||||
diff --git a/chrome/browser/history/history_tab_helper.h b/chrome/browser/history/history_tab_helper.h
|
||||
index 272cd24adc..d821a00b91 100644
|
||||
--- a/chrome/browser/history/history_tab_helper.h
|
||||
+++ b/chrome/browser/history/history_tab_helper.h
|
||||
@@ -10,6 +10,8 @@
|
||||
|
@ -152,9 +138,10 @@ diff --git a/chrome/browser/history/history_tab_helper.h b/chrome/browser/histor
|
|||
explicit HistoryTabHelper(content::WebContents* web_contents);
|
||||
friend class content::WebContentsUserData<HistoryTabHelper>;
|
||||
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
|
||||
index 167237d466..3cfaac5930 100644
|
||||
--- a/chrome/browser/prefs/browser_prefs.cc
|
||||
+++ b/chrome/browser/prefs/browser_prefs.cc
|
||||
@@ -205,6 +205,8 @@
|
||||
@@ -208,6 +208,8 @@
|
||||
#endif
|
||||
|
||||
#if defined(OS_ANDROID)
|
||||
|
@ -163,7 +150,7 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse
|
|||
#include "chrome/browser/android/bookmarks/partner_bookmarks_shim.h"
|
||||
#include "chrome/browser/android/explore_sites/history_statistics_reporter.h"
|
||||
#include "chrome/browser/android/ntp/recent_tabs_page_prefs.h"
|
||||
@@ -908,6 +910,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
@@ -969,6 +971,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
variations::VariationsService::RegisterProfilePrefs(registry);
|
||||
video_tutorials::RegisterPrefs(registry);
|
||||
feed::prefs::RegisterFeedSharedProfilePrefs(registry);
|
||||
|
@ -172,9 +159,10 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse
|
|||
#else // defined(OS_ANDROID)
|
||||
AppShortcutManager::RegisterProfilePrefs(registry);
|
||||
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
index 28babcf456..4ddaa32219 100644
|
||||
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
@@ -856,6 +856,12 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
@@ -865,6 +865,12 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
<message name="IDS_ALWAYS_INCOGNITO_SUMMARY" desc="Summary for always incognito mode">
|
||||
Opens links in incognito tabs when you click on new tab or on a link
|
||||
</message>
|
||||
|
@ -188,12 +176,13 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
|||
Clears history and autocompletions in the address bar. Your Google Account may have other forms of browsing history at <ph name="BEGIN_LINK"><link></ph>myactivity.google.com<ph name="END_LINK"></link></ph>.
|
||||
</message>
|
||||
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
|
||||
index e2b4a4acbd..adfc492a9c 100644
|
||||
--- a/chrome/common/pref_names.cc
|
||||
+++ b/chrome/common/pref_names.cc
|
||||
@@ -3116,4 +3116,9 @@ const char kSecurityTokenSessionNotificationSeconds[] =
|
||||
"security_token_session_notification_seconds";
|
||||
#endif // defined(OS_CHROMEOS)
|
||||
|
||||
@@ -3175,4 +3175,9 @@ const char kCartModuleRemoved[] = "cart_module_removed";
|
||||
const char kCartModuleWelcomeSurfaceShownTimes[] =
|
||||
"cart_module_welcome_surface_shown_times";
|
||||
#endif
|
||||
+#if defined(OS_ANDROID)
|
||||
+const char kIncognitoTabHistoryEnabled[] =
|
||||
+ "incognito_tab_history_enabled";
|
||||
|
@ -201,10 +190,11 @@ diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
|
|||
+
|
||||
} // namespace prefs
|
||||
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
|
||||
index 3d94234961..fdb6ae0c17 100644
|
||||
--- a/chrome/common/pref_names.h
|
||||
+++ b/chrome/common/pref_names.h
|
||||
@@ -1092,6 +1092,10 @@ extern const char kSecurityTokenSessionBehavior[];
|
||||
extern const char kSecurityTokenSessionNotificationSeconds[];
|
||||
@@ -1112,6 +1112,10 @@ extern const char kCartModuleRemoved[];
|
||||
extern const char kCartModuleWelcomeSurfaceShownTimes[];
|
||||
#endif
|
||||
|
||||
+#if defined(OS_ANDROID)
|
||||
|
@ -214,6 +204,3 @@ diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
|
|||
} // namespace prefs
|
||||
|
||||
#endif // CHROME_COMMON_PREF_NAMES_H_
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue