OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/extensions/application_launch.h" | 5 #include "chrome/browser/ui/extensions/application_launch.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "apps/launcher.h" | 9 #include "apps/launcher.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 } | 475 } |
476 | 476 |
477 void OpenApplicationWithReenablePrompt(const AppLaunchParams& params) { | 477 void OpenApplicationWithReenablePrompt(const AppLaunchParams& params) { |
478 const Extension* extension = GetExtension(params); | 478 const Extension* extension = GetExtension(params); |
479 if (!extension) | 479 if (!extension) |
480 return; | 480 return; |
481 Profile* profile = params.profile; | 481 Profile* profile = params.profile; |
482 | 482 |
483 ExtensionService* service = | 483 ExtensionService* service = |
484 extensions::ExtensionSystem::Get(profile)->extension_service(); | 484 extensions::ExtensionSystem::Get(profile)->extension_service(); |
485 if (!service->IsExtensionEnabled(extension->id())) { | 485 if (!service->IsExtensionEnabled(extension->id()) || |
| 486 service->GetTerminatedExtension(extension->id())) { |
486 (new EnableViaAppListFlow( | 487 (new EnableViaAppListFlow( |
487 service, profile, params.desktop_type, extension->id(), | 488 service, profile, params.desktop_type, extension->id(), |
488 base::Bind(base::IgnoreResult(OpenEnabledApplication), params)))->Run(); | 489 base::Bind(base::IgnoreResult(OpenEnabledApplication), params)))->Run(); |
489 return; | 490 return; |
490 } | 491 } |
491 | 492 |
492 OpenEnabledApplication(params); | 493 OpenEnabledApplication(params); |
493 } | 494 } |
494 | 495 |
495 WebContents* OpenAppShortcutWindow(Profile* profile, | 496 WebContents* OpenAppShortcutWindow(Profile* profile, |
(...skipping 16 matching lines...) Expand all Loading... |
512 // up in LoadingStateChanged to schedule a GetApplicationInfo. And when | 513 // up in LoadingStateChanged to schedule a GetApplicationInfo. And when |
513 // the web app info is available, extensions::TabHelper notifies Browser via | 514 // the web app info is available, extensions::TabHelper notifies Browser via |
514 // OnDidGetApplicationInfo, which calls | 515 // OnDidGetApplicationInfo, which calls |
515 // web_app::UpdateShortcutForTabContents when it sees UPDATE_SHORTCUT as | 516 // web_app::UpdateShortcutForTabContents when it sees UPDATE_SHORTCUT as |
516 // pending web app action. | 517 // pending web app action. |
517 extensions::TabHelper::FromWebContents(tab)->set_pending_web_app_action( | 518 extensions::TabHelper::FromWebContents(tab)->set_pending_web_app_action( |
518 extensions::TabHelper::UPDATE_SHORTCUT); | 519 extensions::TabHelper::UPDATE_SHORTCUT); |
519 | 520 |
520 return tab; | 521 return tab; |
521 } | 522 } |
OLD | NEW |