| Index: chrome/browser/browser.cc
|
| diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
|
| index 6379b34f5d4eacd082b20d4b5c2cff6769a84124..5916478d3b7cbcf93fdd7c1030d1d449a55bab51 100644
|
| --- a/chrome/browser/browser.cc
|
| +++ b/chrome/browser/browser.cc
|
| @@ -50,6 +50,7 @@
|
| #include "chrome/browser/tab_contents/navigation_entry.h"
|
| #include "chrome/browser/tab_contents/tab_contents.h"
|
| #include "chrome/browser/tab_contents/tab_contents_view.h"
|
| +#include "chrome/browser/web_applications/web_app.h"
|
| #include "chrome/browser/window_sizer.h"
|
| #include "chrome/common/chrome_constants.h"
|
| #include "chrome/common/chrome_switches.h"
|
| @@ -233,7 +234,7 @@ void Browser::CreateBrowserWindow() {
|
| // Set the app user model id for this application to that of the application
|
| // name. See http://crbug.com/7028.
|
| win_util::SetAppIdForWindow(type_ & TYPE_APP ? app_name_ :
|
| - l10n_util::GetString(IDS_PRODUCT_NAME),
|
| + std::wstring(chrome::kBrowserAppId),
|
| window()->GetNativeHandle());
|
| #endif
|
|
|
| @@ -317,7 +318,7 @@ void Browser::OpenURLOffTheRecord(Profile* profile, const GURL& url) {
|
|
|
| // static
|
| void Browser::OpenApplicationWindow(Profile* profile, const GURL& url) {
|
| - std::wstring app_name = ComputeApplicationNameFromURL(url);
|
| + std::wstring app_name = web_app::GenerateApplicationNameFromURL(url);
|
| RegisterAppPrefs(app_name);
|
|
|
| Browser* browser = Browser::CreateForApp(app_name, profile, false);
|
| @@ -2092,7 +2093,7 @@ bool Browser::IsApplication() const {
|
|
|
| void Browser::ConvertContentsToApplication(TabContents* contents) {
|
| const GURL& url = contents->controller().GetActiveEntry()->url();
|
| - std::wstring app_name = ComputeApplicationNameFromURL(url);
|
| + std::wstring app_name = web_app::GenerateApplicationNameFromURL(url);
|
| RegisterAppPrefs(app_name);
|
|
|
| DetachContents(contents);
|
| @@ -3025,15 +3026,6 @@ void Browser::CloseFrame() {
|
| }
|
|
|
| // static
|
| -std::wstring Browser::ComputeApplicationNameFromURL(const GURL& url) {
|
| - std::string t;
|
| - t.append(url.host());
|
| - t.append("_");
|
| - t.append(url.path());
|
| - return UTF8ToWide(t);
|
| -}
|
| -
|
| -// static
|
| void Browser::RegisterAppPrefs(const std::wstring& app_name) {
|
| // A set of apps that we've already started.
|
| static std::set<std::wstring>* g_app_names = NULL;
|
|
|