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

Side by Side Diff: base/win/win_util.cc

Issue 10643004: Merge 143290 - Replace all spaces by '_' in the AppUserModelId (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/installer/util/shell_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/win/win_util.h" 5 #include "base/win/win_util.h"
6 6
7 #include <aclapi.h> 7 #include <aclapi.h>
8 #include <shobjidl.h> // Must be before propkey. 8 #include <shobjidl.h> // Must be before propkey.
9 #include <propkey.h> 9 #include <propkey.h>
10 #include <propvarutil.h> 10 #include <propvarutil.h>
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 if (FAILED(InitPropVariantFromString(property_string_value, &property_value))) 173 if (FAILED(InitPropVariantFromString(property_string_value, &property_value)))
174 return false; 174 return false;
175 175
176 return SetPropVariantValueForPropertyStore(property_store, 176 return SetPropVariantValueForPropertyStore(property_store,
177 property_key, 177 property_key,
178 &property_value); 178 &property_value);
179 } 179 }
180 180
181 bool SetAppIdForPropertyStore(IPropertyStore* property_store, 181 bool SetAppIdForPropertyStore(IPropertyStore* property_store,
182 const wchar_t* app_id) { 182 const wchar_t* app_id) {
183 // App id should be less than 128 chars and contain no space. And recommended 183 // App id should be less than 64 chars and contain no space. And recommended
184 // format is CompanyName.ProductName[.SubProduct.ProductNumber]. 184 // format is CompanyName.ProductName[.SubProduct.ProductNumber].
185 // See http://msdn.microsoft.com/en-us/library/dd378459%28VS.85%29.aspx 185 // See http://msdn.microsoft.com/en-us/library/dd378459%28VS.85%29.aspx
186 DCHECK(lstrlen(app_id) < 128 && wcschr(app_id, L' ') == NULL); 186 DCHECK(lstrlen(app_id) < 64 && wcschr(app_id, L' ') == NULL);
187 187
188 return SetStringValueForPropertyStore(property_store, 188 return SetStringValueForPropertyStore(property_store,
189 PKEY_AppUserModel_ID, 189 PKEY_AppUserModel_ID,
190 app_id); 190 app_id);
191 } 191 }
192 192
193 bool SetDualModeForPropertyStore(IPropertyStore* property_store) { 193 bool SetDualModeForPropertyStore(IPropertyStore* property_store) {
194 return SetBooleanValueForPropertyStore(property_store, 194 return SetBooleanValueForPropertyStore(property_store,
195 PKEY_AppUserModel_DualMode, 195 PKEY_AppUserModel_DualMode,
196 true) && 196 true) &&
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 246
247 #ifndef COPY_FILE_COPY_SYMLINK 247 #ifndef COPY_FILE_COPY_SYMLINK
248 #error You must install the Windows 2008 or Vista Software Development Kit and \ 248 #error You must install the Windows 2008 or Vista Software Development Kit and \
249 set it as your default include path to build this library. You can grab it by \ 249 set it as your default include path to build this library. You can grab it by \
250 searching for "download windows sdk 2008" in your favorite web search engine. \ 250 searching for "download windows sdk 2008" in your favorite web search engine. \
251 Also make sure you register the SDK with Visual Studio, by selecting \ 251 Also make sure you register the SDK with Visual Studio, by selecting \
252 "Integrate Windows SDK with Visual Studio 2005" from the Windows SDK \ 252 "Integrate Windows SDK with Visual Studio 2005" from the Windows SDK \
253 menu (see Start - All Programs - Microsoft Windows SDK - \ 253 menu (see Start - All Programs - Microsoft Windows SDK - \
254 Visual Studio Registration). 254 Visual Studio Registration).
255 #endif 255 #endif
OLDNEW
« no previous file with comments | « no previous file | chrome/installer/util/shell_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698