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

Replace deprecated getLastUsedProfile function in ChromeAppModule.

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

While ChromeAppModule generates
|ChromeAppModule_ProvideLastUsedProfileFactory| class to deliver
regular profile with dependency injection, with this change it will
generate |ChromeAppModule_ProvideLastUsedRegularProfileFactory| for
the same purpose to reduce the naming confusion.

Bug: 1041781
Change-Id: I27e1e9e8e19a5b0cf5326539a624261ef3fe0901
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2149323Reviewed-by: default avatarRamin Halavati <rhalavati@chromium.org>
Reviewed-by: default avatarPeter Conn <peconn@chromium.org>
Commit-Queue: Side YILMAZ <sideyilmaz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#759592}
parent c3c4b666
......@@ -5,7 +5,7 @@
package org.chromium.chrome.browser.dependency_injection;
import static org.chromium.chrome.browser.dependency_injection.ChromeCommonQualifiers.APP_CONTEXT;
import static org.chromium.chrome.browser.dependency_injection.ChromeCommonQualifiers.LAST_USED_PROFILE;
import static org.chromium.chrome.browser.dependency_injection.ChromeCommonQualifiers.LAST_USED_REGULAR_PROFILE;
import android.content.Context;
......@@ -36,9 +36,9 @@ public class ChromeAppModule {
public interface Factory { ChromeAppModule create(); }
@Provides
@Named(LAST_USED_PROFILE)
public Profile provideLastUsedProfile() {
return Profile.getLastUsedProfile();
@Named(LAST_USED_REGULAR_PROFILE)
public Profile provideLastUsedRegularProfile() {
return Profile.getLastUsedRegularProfile();
}
@Provides
......
......@@ -9,7 +9,7 @@ package org.chromium.chrome.browser.dependency_injection;
* when it is ambiguous.
*/
public interface ChromeCommonQualifiers {
String LAST_USED_PROFILE = "LAST_USED_PROFILE";
String LAST_USED_REGULAR_PROFILE = "LAST_USED_REGULAR_PROFILE";
String ACTIVITY_CONTEXT = "ACTIVITY_CONTEXT";
String APP_CONTEXT = "APP_CONTEXT";
......
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