summaryrefslogtreecommitdiffstats
path: root/chrome/browser/web_applications
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-11 03:02:51 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-11 03:02:51 +0000
commit57ecc4bf4069cb869e5fb0a7d922eec2384bac25 (patch)
tree1b4668fa59d6b6a072144b4ddab8d5f6faba3fa4 /chrome/browser/web_applications
parent1af19cfd7b1ef9924516dbe811db495315feaefe (diff)
downloadchromium_src-57ecc4bf4069cb869e5fb0a7d922eec2384bac25.zip
chromium_src-57ecc4bf4069cb869e5fb0a7d922eec2384bac25.tar.gz
chromium_src-57ecc4bf4069cb869e5fb0a7d922eec2384bac25.tar.bz2
Make prefs use std::string for keys rather than wstrings.
Much remains to be converted. BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3076037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55660 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/web_applications')
-rw-r--r--chrome/browser/web_applications/web_app.cc8
-rw-r--r--chrome/browser/web_applications/web_app.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/web_applications/web_app.cc b/chrome/browser/web_applications/web_app.cc
index dea6f74..c79527c 100644
--- a/chrome/browser/web_applications/web_app.cc
+++ b/chrome/browser/web_applications/web_app.cc
@@ -373,7 +373,7 @@ bool CreateShortcutTask::CreateShortcut() {
// Generates app id from web app url and profile path.
std::wstring app_id = ShellIntegration::GetAppId(
- web_app::GenerateApplicationNameFromURL(shortcut_info_.url),
+ UTF8ToWide(web_app::GenerateApplicationNameFromURL(shortcut_info_.url)),
profile_path_);
FilePath shortcut_to_pin;
@@ -630,7 +630,7 @@ void UpdateShortcutWorker::UpdateShortcutsOnFileThread() {
if (!shortcut_files_.empty()) {
// Generates app id from web app url and profile path.
std::wstring app_id = ShellIntegration::GetAppId(
- web_app::GenerateApplicationNameFromURL(shortcut_info_.url),
+ UTF8ToWide(web_app::GenerateApplicationNameFromURL(shortcut_info_.url)),
profile_path_);
// Sanitize description
@@ -681,12 +681,12 @@ DISABLE_RUNNABLE_METHOD_REFCOUNT(UpdateShortcutWorker);
namespace web_app {
-std::wstring GenerateApplicationNameFromURL(const GURL& url) {
+std::string GenerateApplicationNameFromURL(const GURL& url) {
std::string t;
t.append(url.host());
t.append("_");
t.append(url.path());
- return UTF8ToWide(t);
+ return t;
}
void CreateShortcut(
diff --git a/chrome/browser/web_applications/web_app.h b/chrome/browser/web_applications/web_app.h
index ddacac8..c451e85 100644
--- a/chrome/browser/web_applications/web_app.h
+++ b/chrome/browser/web_applications/web_app.h
@@ -22,7 +22,7 @@ namespace web_app {
// Compute a deterministic name based on the URL. We use this pseudo name
// as a key to store window location per application URLs in Browser and
// as app id for BrowserWindow, shortcut and jump list.
-std::wstring GenerateApplicationNameFromURL(const GURL& url);
+std::string GenerateApplicationNameFromURL(const GURL& url);
// Callback after user dismisses CreateShortcutView. "true" indicates
// shortcut is created successfully. Otherwise, it is false.