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

Replace deprecated getLastUsedProfile function in WebContentsFactory.

|Profile#getLastUsedProfile| is depreciated and replaced with
|Profile#getLastUsedRegularProfile|. This CL updates WebContentsFactory
class.

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

Bug: 1041781
Change-Id: I78995577933aba3cf06e3720ae5ccd0d7b77851f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2069322Reviewed-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@{#744584}
parent 4f532ce3
...@@ -30,7 +30,7 @@ public class WebContentsFactory { ...@@ -30,7 +30,7 @@ public class WebContentsFactory {
// TODO(pshmakov): remove static for unit-testability. // TODO(pshmakov): remove static for unit-testability.
public static WebContents createWebContents(boolean incognito, boolean initiallyHidden) { public static WebContents createWebContents(boolean incognito, boolean initiallyHidden) {
return WebContentsFactoryJni.get().createWebContents( return WebContentsFactoryJni.get().createWebContents(
Profile.getLastUsedProfile(), incognito, initiallyHidden, false); Profile.getLastUsedRegularProfile(), incognito, initiallyHidden, false);
} }
/** /**
...@@ -46,7 +46,7 @@ public class WebContentsFactory { ...@@ -46,7 +46,7 @@ public class WebContentsFactory {
public WebContents createWebContentsWithWarmRenderer( public WebContents createWebContentsWithWarmRenderer(
boolean incognito, boolean initiallyHidden) { boolean incognito, boolean initiallyHidden) {
return WebContentsFactoryJni.get().createWebContents( return WebContentsFactoryJni.get().createWebContents(
Profile.getLastUsedProfile(), incognito, initiallyHidden, true); Profile.getLastUsedRegularProfile(), incognito, initiallyHidden, true);
} }
@NativeMethods @NativeMethods
......
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