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

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

Issue 7249013: Extension ID should be converted to app name when it is passed to the Browser. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_navigator.cc
===================================================================
--- chrome/browser/ui/browser_navigator.cc (revision 90225)
+++ chrome/browser/ui/browser_navigator.cc (working copy)
@@ -20,6 +20,7 @@
#include "chrome/browser/ui/status_bubble.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/browser/ui/webui/chrome_web_ui_factory.h"
+#include "chrome/browser/web_applications/web_app.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/url_constants.h"
@@ -144,13 +145,15 @@
// Coerce app-style if |params->browser| or |source| represents an app.
std::string app_name;
if (!params->extension_app_id.empty()) {
- app_name = params->extension_app_id;
+ app_name = web_app::GenerateApplicationNameFromExtensionId(
+ params->extension_app_id);
} else if (params->browser && !params->browser->app_name().empty()) {
app_name = params->browser->app_name();
} else if (params->source_contents &&
params->source_contents->extension_tab_helper()->is_app()) {
- app_name = params->source_contents->extension_tab_helper()->
- extension_app()->id();
+ app_name = web_app::GenerateApplicationNameFromExtensionId(
+ params->source_contents->extension_tab_helper()->
+ extension_app()->id());
}
if (app_name.empty()) {
Browser::CreateParams browser_params(Browser::TYPE_POPUP, profile);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698