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

Unified Diff: chrome/installer/util/shell_util.cc

Issue 10559097: Replace all spaces by '_' in the AppUserModelId (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
« base/win/win_util.cc ('K') | « base/win/win_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/shell_util.cc
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc
index 229abe52f79b9b56664f144c7750c697bdd8306b..0970db23d6962312f98b5e591aba594bbe66349f 100644
--- a/chrome/installer/util/shell_util.cc
+++ b/chrome/installer/util/shell_util.cc
@@ -1116,8 +1116,10 @@ string16 ShellUtil::BuildAppModelId(
if (it != components.begin())
app_id.push_back(L'.');
- const string16& component = *it;
+ string16 component = *it;
DCHECK(!component.empty());
+ // No spaces are allowed in the AppUserModelId according to MSDN.
+ ReplaceChars(component, L" ", L"_", &component);
robertshield 2012/06/20 21:50:16 could you do this replacement at the end of the lo
gab 2012/06/20 21:58:36 Done.
if (component.length() > max_component_length) {
// Append a shortened version of this component. Cut in the middle to try
// to avoid losing the unique parts of this component (which are usually
« base/win/win_util.cc ('K') | « base/win/win_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698