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

Unified Diff: chrome/browser/ui/browser_init.cc

Issue 5560007: Don't update icon of chrome app shortcuts from the favicon of the hosted URL. (Closed)
Patch Set: Rev commnets Created 10 years 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
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_init.cc
diff --git a/chrome/browser/ui/browser_init.cc b/chrome/browser/ui/browser_init.cc
index cb1d46572b1b38c0850b215c6972484f3fdfacb9..60fd1b34549a0e4ca4ff38771ef3a8ef7cfcc59a 100644
--- a/chrome/browser/ui/browser_init.cc
+++ b/chrome/browser/ui/browser_init.cc
@@ -628,12 +628,12 @@ bool BrowserInit::LaunchWithProfile::OpenApplicationWindow(Profile* profile) {
const Extension* extension =
extensions_service->GetExtensionById(app_id, false);
- // The extension with |app_id| may have been uninstalled.
+ // The extension with id |app_id| may have been uninstalled.
if (!extension)
return false;
- // Look at prefs to find the container in which an app should launch.
- // If no preference is set, launch in a window.
+ // Look at preferences to find the right launch container. If no
+ // preference is set, launch as a window.
extension_misc::LaunchContainer launch_container =
extensions_service->extension_prefs()->GetLaunchContainer(
extension, ExtensionPrefs::LAUNCH_WINDOW);
@@ -657,8 +657,11 @@ bool BrowserInit::LaunchWithProfile::OpenApplicationWindow(Profile* profile) {
ChildProcessSecurityPolicy::GetInstance();
if (policy->IsWebSafeScheme(url.scheme()) ||
url.SchemeIs(chrome::kFileScheme)) {
- Browser::OpenApplicationWindow(profile, url);
- return true;
+ TabContents* app_tab = Browser::OpenAppShortcutWindow(
+ profile,
+ url,
+ true); // Update app info.
+ return (app_tab != NULL);
}
}
return false;
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698