Index: chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.cc |
diff --git a/chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.cc b/chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.cc |
index 1654dc0405fd0654f7c8ce94d6d3b1e9c5960e8e..320e6ac13636dcc44a269e3b302b29395009672e 100644 |
--- a/chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.cc |
+++ b/chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_views.cc |
@@ -35,6 +35,8 @@ |
#if defined(OS_CHROMEOS) |
#include "chrome/browser/chromeos/arc/arc_session_manager.h" |
+#include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" |
+#include "chrome/browser/ui/app_list/arc/arc_app_utils.h" |
#include "chrome/browser/ui/views/apps/app_info_dialog/arc_app_info_links_panel.h" |
#endif |
@@ -110,12 +112,7 @@ void ShowAppInfoInNativeDialog(content::WebContents* web_contents, |
AppInfoDialog::AppInfoDialog(gfx::NativeWindow parent_window, |
Profile* profile, |
const extensions::Extension* app) |
- : dialog_header_(NULL), |
- dialog_body_(NULL), |
- dialog_footer_(NULL), |
- profile_(profile), |
- app_id_(app->id()), |
- extension_registry_(NULL) { |
+ : profile_(profile), app_id_(app->id()) { |
views::BoxLayout* layout = |
new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0); |
SetLayoutManager(layout); |
@@ -146,10 +143,17 @@ AppInfoDialog::AppInfoDialog(gfx::NativeWindow parent_window, |
dialog_body_contents->AddChildView(new AppInfoPermissionsPanel(profile, app)); |
#if defined(OS_CHROMEOS) |
- // When ARC is enabled, show the "Manage supported links" link for Chrome. |
- if (arc::ArcSessionManager::Get()->IsArcEnabled() && |
- app->id() == extension_misc::kChromeAppId) |
- dialog_body_contents->AddChildView(new ArcAppInfoLinksPanel(profile, app)); |
+ // When ARC is enabled and Settings app is available, show the |
msw
2017/02/15 21:48:28
nit: 'the Settings app'
khmel
2017/02/16 15:47:51
Done.
|
+ // "Manage supported links" link for Chrome. |
khmel
2017/02/15 16:38:45
Problem was we asked for IsArcEnabled but that was
msw
2017/02/15 21:48:28
Wouldn't the IsArcEnabled check here be incorrectl
khmel
2017/02/16 15:47:51
We don't allow ARC for secondary profile, so we ha
msw
2017/02/16 18:55:14
Mightn't we someday allow Arc on either profile? I
khmel
2017/02/16 20:33:29
Actually there is currently a project (probably af
|
+ if (app->id() == extension_misc::kChromeAppId && |
+ arc::ArcSessionManager::Get()->IsArcEnabled()) { |
+ const ArcAppListPrefs* arc_app_list_prefs = ArcAppListPrefs::Get(profile); |
+ if (arc_app_list_prefs && |
+ arc_app_list_prefs->IsRegistered(arc::kSettingsAppId)) { |
+ arc_app_info_links_ = new ArcAppInfoLinksPanel(profile, app); |
msw
2017/02/15 21:48:28
optional nit: consider (1) removing this member an
khmel
2017/02/16 15:47:51
All ideas look reasonable and I don't have any pre
|
+ dialog_body_contents->AddChildView(arc_app_info_links_); |
+ } |
+ } |
#endif |
// Clip the scrollable view so that the scrollbar appears. As long as this |