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 { ...@@ -661,7 +661,7 @@ public class DownloadNotificationService {
private void cancelOffTheRecordDownloads() { private void cancelOffTheRecordDownloads() {
boolean cancelActualDownload = BrowserStartupController.getInstance().isFullBrowserStarted() boolean cancelActualDownload = BrowserStartupController.getInstance().isFullBrowserStarted()
&& Profile.getLastUsedProfile().hasOffTheRecordProfile(); && Profile.getLastUsedRegularProfile().hasOffTheRecordProfile();
List<DownloadSharedPreferenceEntry> entries = mDownloadSharedPreferenceHelper.getEntries(); List<DownloadSharedPreferenceEntry> entries = mDownloadSharedPreferenceHelper.getEntries();
List<DownloadSharedPreferenceEntry> copies = List<DownloadSharedPreferenceEntry> copies =
......
...@@ -74,7 +74,7 @@ public class IncognitoNotificationService extends IntentService { ...@@ -74,7 +74,7 @@ public class IncognitoNotificationService extends IntentService {
IncognitoNotificationManager.dismissIncognitoNotification(); IncognitoNotificationManager.dismissIncognitoNotification();
if (BrowserStartupController.getInstance().isFullBrowserStarted()) { if (BrowserStartupController.getInstance().isFullBrowserStarted()) {
if (Profile.getLastUsedProfile().hasOffTheRecordProfile()) { if (Profile.getLastUsedRegularProfile().hasOffTheRecordProfile()) {
Profile.getLastUsedRegularProfile() Profile.getLastUsedRegularProfile()
.getOffTheRecordProfile() .getOffTheRecordProfile()
.destroyWhenAppropriate(); .destroyWhenAppropriate();
......
...@@ -43,7 +43,7 @@ public class IncognitoUtils { ...@@ -43,7 +43,7 @@ public class IncognitoUtils {
@SuppressLint("NewApi") @SuppressLint("NewApi")
public static boolean shouldDestroyIncognitoProfileOnStartup() { public static boolean shouldDestroyIncognitoProfileOnStartup() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP
|| !Profile.getLastUsedProfile().hasOffTheRecordProfile()) { || !Profile.getLastUsedRegularProfile().hasOffTheRecordProfile()) {
return false; return false;
} }
......
...@@ -139,7 +139,7 @@ public class CookiesFetcher { ...@@ -139,7 +139,7 @@ public class CookiesFetcher {
*/ */
public static boolean deleteCookiesIfNecessary() { public static boolean deleteCookiesIfNecessary() {
try { try {
if (Profile.getLastUsedProfile().hasOffTheRecordProfile()) return false; if (Profile.getLastUsedRegularProfile().hasOffTheRecordProfile()) return false;
scheduleDeleteCookiesFile(); scheduleDeleteCookiesFile();
} catch (RuntimeException e) { } catch (RuntimeException e) {
e.printStackTrace(); 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