Commit 6d311635 authored by Danan S's avatar Danan S Committed by Commit Bot

Revert "Remove UninstallArcApps method from add supervision API"

Only rollback the changes to arc_app_utils.*, which it turns out we need
in another in-flight CL:
https://chromium-review.googlesource.com/c/chromium/src/+/1606571

This reverts part of commit 7e1d0290.

Bug: 937995
Change-Id: Id8df13e94019fea5b07da6f8d03fea8a736d6be4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1637646Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Danan S <danan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665024}
parent 1f0e0a48
...@@ -639,6 +639,12 @@ std::string AppIdToArcPackageName(const std::string& app_id, Profile* profile) { ...@@ -639,6 +639,12 @@ std::string AppIdToArcPackageName(const std::string& app_id, Profile* profile) {
return app_info->package_name; return app_info->package_name;
} }
std::string ArcPackageNameToAppId(const std::string& package_name,
Profile* profile) {
ArcAppListPrefs* arc_prefs = ArcAppListPrefs::Get(profile);
return arc_prefs->GetAppIdByPackageName(package_name);
}
bool IsArcAppSticky(const std::string& app_id, Profile* profile) { bool IsArcAppSticky(const std::string& app_id, Profile* profile) {
ArcAppListPrefs* arc_prefs = ArcAppListPrefs::Get(profile); ArcAppListPrefs* arc_prefs = ArcAppListPrefs::Get(profile);
std::unique_ptr<ArcAppListPrefs::AppInfo> app_info = std::unique_ptr<ArcAppListPrefs::AppInfo> app_info =
......
...@@ -189,6 +189,11 @@ void GetAndroidId( ...@@ -189,6 +189,11 @@ void GetAndroidId(
// be the AppID of an ARC app. // be the AppID of an ARC app.
std::string AppIdToArcPackageName(const std::string& app_id, Profile* profile); std::string AppIdToArcPackageName(const std::string& app_id, Profile* profile);
// Returns the AppID for the specified package_name, which must be the package
// name of an ARC app.
std::string ArcPackageNameToAppId(const std::string& package_name,
Profile* profile);
// Returns true if the ARC app is sticky (not uninstallable). This function // Returns true if the ARC app is sticky (not uninstallable). This function
// will DCHECK if app_id isn't installed. This functionality should eventually // will DCHECK if app_id isn't installed. This functionality should eventually
// move to the App Service: (https://crbug.com/948408). // move to the App Service: (https://crbug.com/948408).
......
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