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

Side by Side Diff: chrome/browser/ui/extensions/application_launch.cc

Issue 169303002: Fix launching crashed apps from the command line while Chrome is running. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/startup/startup_browser_creator_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/startup/startup_browser_creator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698