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

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

Issue 10386167: Always do DelegateExecute handler COM registration and make set dual mode prop on shortcuts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
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) < 128 && 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 DCHECK_GE(base::win::GetVersion(), base::win::VERSION_WIN8);
195
196 return SetBooleanValueForPropertyStore(property_store, 194 return SetBooleanValueForPropertyStore(property_store,
197 PKEY_AppUserModel_DualMode, 195 PKEY_AppUserModel_DualMode,
gab 2012/05/16 17:04:22 While you are touching this code it might be good
grt (UTC plus 2) 2012/05/16 17:16:16 We're still compiling against the win7 SDK, so the
198 true) && 196 true) &&
199 SetUInt32ValueForPropertyStore(property_store, 197 SetUInt32ValueForPropertyStore(property_store,
200 PKEY_AppUserModel_DualMode_UK, 198 PKEY_AppUserModel_DualMode_UK,
201 1U); 199 1U);
202 } 200 }
203 201
204 static const char16 kAutoRunKeyPath[] = 202 static const char16 kAutoRunKeyPath[] =
205 L"Software\\Microsoft\\Windows\\CurrentVersion\\Run"; 203 L"Software\\Microsoft\\Windows\\CurrentVersion\\Run";
206 204
207 bool AddCommandToAutoRun(HKEY root_key, const string16& name, 205 bool AddCommandToAutoRun(HKEY root_key, const string16& name,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 246
249 #ifndef COPY_FILE_COPY_SYMLINK 247 #ifndef COPY_FILE_COPY_SYMLINK
250 #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 \
251 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 \
252 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. \
253 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 \
254 "Integrate Windows SDK with Visual Studio 2005" from the Windows SDK \ 252 "Integrate Windows SDK with Visual Studio 2005" from the Windows SDK \
255 menu (see Start - All Programs - Microsoft Windows SDK - \ 253 menu (see Start - All Programs - Microsoft Windows SDK - \
256 Visual Studio Registration). 254 Visual Studio Registration).
257 #endif 255 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698