Chromium Code Reviews| Index: chrome/browser/ui/app_list/arc/arc_app_utils.cc |
| diff --git a/chrome/browser/ui/app_list/arc/arc_app_utils.cc b/chrome/browser/ui/app_list/arc/arc_app_utils.cc |
| index cabb267117349f66fe9daa20b24ad269ea836dc4..c5a183af382f5a60b709f72646336caf4355ea31 100644 |
| --- a/chrome/browser/ui/app_list/arc/arc_app_utils.cc |
| +++ b/chrome/browser/ui/app_list/arc/arc_app_utils.cc |
| @@ -163,6 +163,8 @@ class LaunchAppWithoutSize { |
| } // namespace |
| const char kPlayStoreAppId[] = "gpkmicpkkebkmabiaedjognfppcchdfa"; |
| +const char kPlayStorePackage[] = "com.android.vending"; |
| +const char kPlayStoreActivity[] = "com.android.vending.AssetBrowserActivity"; |
| const char kSettingsAppId[] = "mconboelelhjpkbdhhiijkgcimoangdj"; |
| bool ShouldShowInLauncher(const std::string& app_id) { |
| @@ -219,7 +221,7 @@ bool LaunchApp(content::BrowserContext* context, const std::string& app_id) { |
| bool LaunchApp(content::BrowserContext* context, |
| const std::string& app_id, |
| bool landscape_layout) { |
| - const ArcAppListPrefs* prefs = ArcAppListPrefs::Get(context); |
| + ArcAppListPrefs* prefs = ArcAppListPrefs::Get(context); |
| std::unique_ptr<ArcAppListPrefs::AppInfo> app_info = prefs->GetApp(app_id); |
| if (app_info && !app_info->ready) { |
| if (!ash::Shell::HasInstance()) |
| @@ -241,10 +243,15 @@ bool LaunchApp(content::BrowserContext* context, |
| } |
| } |
| - ChromeLauncherController* chrome_controller = |
| - ChromeLauncherController::instance(); |
| - DCHECK(chrome_controller); |
| - chrome_controller->GetArcDeferredLauncher()->RegisterDeferredLaunch(app_id); |
| + // PlayStore is automatically opened on sing in completed. |
|
xiyuan
2016/09/06 21:24:46
nit: sing -> sign
khmel
2016/09/06 23:11:59
Done.
|
| + if (app_id != kPlayStoreAppId) { |
|
xiyuan
2016/09/06 21:24:46
What happens if arc is enabled (i.e. no opt-in nee
khmel
2016/09/06 23:11:59
Good point, I reduced check condition. (Making Pla
|
| + ChromeLauncherController* chrome_controller = |
| + ChromeLauncherController::instance(); |
| + DCHECK(chrome_controller); |
| + chrome_controller->GetArcDeferredLauncher()->RegisterDeferredLaunch( |
| + app_id); |
| + } |
| + prefs->SetLastLaunchTime(app_id, base::Time::Now()); |
| return true; |
| } |