| Index: chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc
|
| diff --git a/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc
|
| index 36446c5180e60783503e3b37770ac87a1e771120..bd0482a01498714d852ab32bfdc439987ee0bdec 100644
|
| --- a/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc
|
| +++ b/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc
|
| @@ -14,6 +14,7 @@
|
| #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h"
|
| #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_tab.h"
|
| #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
|
| +#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_util.h"
|
| #include "chrome/browser/ui/ash/launcher/launcher_application_menu_item_model.h"
|
| #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h"
|
| #include "chrome/browser/ui/ash/launcher/launcher_controller_helper.h"
|
| @@ -81,7 +82,7 @@ AppShortcutLauncherItemController::AppShortcutLauncherItemController(
|
| // To detect V1 applications we use their domain and match them against the
|
| // used URL. This will also work with applications like Google Drive.
|
| const Extension* extension =
|
| - launcher_controller()->GetExtensionForAppID(app_id);
|
| + GetExtensionForAppID(app_id, controller->GetProfile());
|
| // Some unit tests have no real extension.
|
| if (extension) {
|
| set_refocus_url(GURL(
|
| @@ -140,7 +141,7 @@ void AppShortcutLauncherItemController::Close() {
|
| launcher_controller()->GetV1ApplicationsFromAppId(app_id());
|
| for (size_t i = 0; i < content.size(); i++) {
|
| Browser* browser = chrome::FindBrowserWithWebContents(content[i]);
|
| - if (!browser || !launcher_controller()->IsBrowserFromActiveUser(browser))
|
| + if (!browser || !IsBrowserFromActiveUser(browser))
|
| continue;
|
| TabStripModel* tab_strip = browser->tab_strip_model();
|
| int index = tab_strip->GetIndexOfWebContents(content[i]);
|
| @@ -181,14 +182,14 @@ AppShortcutLauncherItemController::GetRunningApplications() {
|
| }
|
|
|
| const Extension* extension =
|
| - launcher_controller()->GetExtensionForAppID(app_id());
|
| + GetExtensionForAppID(app_id(), launcher_controller()->GetProfile());
|
|
|
| // It is possible to come here While an extension gets loaded.
|
| if (!extension)
|
| return items;
|
|
|
| for (auto* browser : *BrowserList::GetInstance()) {
|
| - if (!launcher_controller()->IsBrowserFromActiveUser(browser))
|
| + if (!IsBrowserFromActiveUser(browser))
|
| continue;
|
| TabStripModel* tab_strip = browser->tab_strip_model();
|
| for (int index = 0; index < tab_strip->count(); index++) {
|
| @@ -227,7 +228,7 @@ bool AppShortcutLauncherItemController::IsDraggable() {
|
| }
|
|
|
| bool AppShortcutLauncherItemController::CanPin() const {
|
| - return launcher_controller()->GetPinnable(app_id()) ==
|
| + return GetPinnableForAppID(app_id(), launcher_controller()->GetProfile()) ==
|
| AppListControllerDelegate::PIN_EDITABLE;
|
| }
|
|
|
| @@ -245,7 +246,7 @@ content::WebContents* AppShortcutLauncherItemController::GetLRUApplication() {
|
| }
|
|
|
| const Extension* extension =
|
| - launcher_controller()->GetExtensionForAppID(app_id());
|
| + GetExtensionForAppID(app_id(), launcher_controller()->GetProfile());
|
|
|
| // We may get here while the extension is loading (and NULL).
|
| if (!extension)
|
| @@ -368,7 +369,7 @@ bool AppShortcutLauncherItemController::AdvanceToNextApp() {
|
|
|
| bool AppShortcutLauncherItemController::IsV2App() {
|
| const Extension* extension =
|
| - launcher_controller()->GetExtensionForAppID(app_id());
|
| + GetExtensionForAppID(app_id(), launcher_controller()->GetProfile());
|
| return extension && extension->is_platform_app();
|
| }
|
|
|
|
|