Apply suggestions from code review

This commit is contained in:
Carl 2020-11-16 20:18:44 +01:00 committed by GitHub
parent f545de305f
commit 2e2fa340ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,7 +44,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
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";
+public static final String PREF_INCOGNITO_TAB_HISTORY_ENABLED = "incognito_history_enabled";
+ public static final String PREF_INCOGNITO_TAB_HISTORY_ENABLED = "incognito_history_enabled";
private static final String[] NEW_PRIVACY_PREFERENCE_ORDER = {PREF_CLEAR_BROWSING_DATA,
PREF_CAN_MAKE_PAYMENT, PREF_NETWORK_PREDICTIONS,
@ -109,9 +109,9 @@ diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/histo
Profile::FromBrowserContext(web_contents()->GetBrowserContext());
+
+#if defined(OS_ANDROID)
+ if(profile->GetOriginalProfile()->GetPrefs()->GetBoolean(prefs::kIncognitoTabHistoryEnabled)) {
+ return HistoryServiceFactory::GetForProfile(profile, ServiceAccessType::IMPLICIT_ACCESS);
+ }
+ if(profile->GetOriginalProfile()->GetPrefs()->GetBoolean(prefs::kIncognitoTabHistoryEnabled)) {
+ return HistoryServiceFactory::GetForProfile(profile, ServiceAccessType::IMPLICIT_ACCESS);
+ }
+#endif
+
if (profile->IsOffTheRecord())
@ -216,4 +216,3 @@ diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
#endif // CHROME_COMMON_PREF_NAMES_H_
--
2.17.1