Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Unified Diff: chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc

Issue 12022002: Fixing activation states from the new launcher. Also adding a whole bunch of unit tests for the new… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed problem with ASAN unittest Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698