| 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 4a885cdc48de2773c812ebb3924999dfa8f74187..a92f53a5f544a7424287bc4ba4a0cfaeaf12398e 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
|
| @@ -33,7 +33,9 @@ AppShortcutLauncherItemController::AppShortcutLauncherItemController(
|
| // used URL. This will also work with applications like Google Drive.
|
| const Extension* extension =
|
| launcher_controller()->GetExtensionForAppID(app_id);
|
| - refocus_url_ = GURL(extension->launch_web_url() + "*");
|
| + // Some unit tests have no real extension and will set their
|
| + if (extension)
|
| + refocus_url_ = GURL(extension->launch_web_url() + "*");
|
| }
|
|
|
| AppShortcutLauncherItemController::~AppShortcutLauncherItemController() {
|
| @@ -63,8 +65,7 @@ void AppShortcutLauncherItemController::Launch(int event_flags) {
|
| }
|
|
|
| void AppShortcutLauncherItemController::Activate() {
|
| - std::vector<content::WebContents*> content =
|
| - app_controller_->GetV1ApplicationsFromAppId(app_id());
|
| + std::vector<content::WebContents*> content = GetRunningApplications();
|
| if (content.empty()) {
|
| Launch(ui::EF_NONE);
|
| return;
|
|
|