Commit b063b6c3 authored by Side Yilmaz's avatar Side Yilmaz Committed by Commit Bot

Replace |getLastUsedProfile#hasOffTheRecordProfile| with

|getLastUsedProfile#hasOffTheRecordProfile|.

|Profile#getLastUsedProfile| is depreciated and replaced with
|Profile#getLastUsedRegularProfile|. This change replaces
|Profile#getLastUsedProfile#hasOffTheRecordProfile| with
|Profile#getLastUsedRegularProfile#hasOffTheRecordProfile|.

Note: This change is only code clean-up, does not change any behavior.

Bug: 1041781
Change-Id: I57d1885c80770e8652ac3c1dc04cb82cb55b1010
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2064391Reviewed-by: default avatarRamin Halavati <rhalavati@chromium.org>
Reviewed-by: default avatarBoris Sazonov <bsazonov@chromium.org>
Commit-Queue: Side YILMAZ <sideyilmaz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#743842}
parent 878ef681
......@@ -661,7 +661,7 @@ public class DownloadNotificationService {
private void cancelOffTheRecordDownloads() {
boolean cancelActualDownload = BrowserStartupController.getInstance().isFullBrowserStarted()
&& Profile.getLastUsedProfile().hasOffTheRecordProfile();
&& Profile.getLastUsedRegularProfile().hasOffTheRecordProfile();
List<DownloadSharedPreferenceEntry> entries = mDownloadSharedPreferenceHelper.getEntries();
List<DownloadSharedPreferenceEntry> copies =
......
......@@ -74,7 +74,7 @@ public class IncognitoNotificationService extends IntentService {
IncognitoNotificationManager.dismissIncognitoNotification();
if (BrowserStartupController.getInstance().isFullBrowserStarted()) {
if (Profile.getLastUsedProfile().hasOffTheRecordProfile()) {
if (Profile.getLastUsedRegularProfile().hasOffTheRecordProfile()) {
Profile.getLastUsedRegularProfile()
.getOffTheRecordProfile()
.destroyWhenAppropriate();
......
......@@ -43,7 +43,7 @@ public class IncognitoUtils {
@SuppressLint("NewApi")
public static boolean shouldDestroyIncognitoProfileOnStartup() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP
|| !Profile.getLastUsedProfile().hasOffTheRecordProfile()) {
|| !Profile.getLastUsedRegularProfile().hasOffTheRecordProfile()) {
return false;
}
......
......@@ -139,7 +139,7 @@ public class CookiesFetcher {
*/
public static boolean deleteCookiesIfNecessary() {
try {
if (Profile.getLastUsedProfile().hasOffTheRecordProfile()) return false;
if (Profile.getLastUsedRegularProfile().hasOffTheRecordProfile()) return false;
scheduleDeleteCookiesFile();
} catch (RuntimeException e) {
e.printStackTrace();
......
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