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

Side by Side Diff: win8/metro_driver/winrt_utils.cc

Issue 23258005: Give SxS distribution its own registration GUIDs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add linker dependency from metro_driver to installer_util Created 7 years, 3 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
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 "stdafx.h" 5 #include "stdafx.h"
6 #include "winrt_utils.h" 6 #include "winrt_utils.h"
7 7
8 #include <shlobj.h> 8 #include <shlobj.h>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/win/scoped_com_initializer.h" 12 #include "base/win/scoped_com_initializer.h"
13 #include "base/win/scoped_comptr.h" 13 #include "base/win/scoped_comptr.h"
14 #include "chrome/installer/util/install_util.h"
14 15
15 void CheckHR(HRESULT hr, const char* message) { 16 void CheckHR(HRESULT hr, const char* message) {
16 if (FAILED(hr)) { 17 if (FAILED(hr)) {
17 if (message) 18 if (message)
18 PLOG(DFATAL) << message << ", hr = " << std::hex << hr; 19 PLOG(DFATAL) << message << ", hr = " << std::hex << hr;
19 else 20 else
20 PLOG(DFATAL) << "COM ERROR" << ", hr = " << std::hex << hr; 21 PLOG(DFATAL) << "COM ERROR" << ", hr = " << std::hex << hr;
21 } 22 }
22 } 23 }
23 24
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 wchar_t path_buffer[MAX_PATH] = {}; 203 wchar_t path_buffer[MAX_PATH] = {};
203 204
204 if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, 205 if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_APPDATA, NULL,
205 SHGFP_TYPE_CURRENT, path_buffer))) { 206 SHGFP_TYPE_CURRENT, path_buffer))) {
206 base::FilePath shortcut(path_buffer); 207 base::FilePath shortcut(path_buffer);
207 shortcut = shortcut.Append( 208 shortcut = shortcut.Append(
208 L"Microsoft\\Internet Explorer\\Quick Launch\\User Pinned\\TaskBar"); 209 L"Microsoft\\Internet Explorer\\Quick Launch\\User Pinned\\TaskBar");
209 210
210 // TODO(robertshield): Get this stuff from BrowserDistribution. 211 // TODO(robertshield): Get this stuff from BrowserDistribution.
211 #if defined(GOOGLE_CHROME_BUILD) 212 #if defined(GOOGLE_CHROME_BUILD)
212 shortcut = shortcut.Append(L"Google Chrome.lnk"); 213 if (InstallUtil::IsChromeSxSProcess())
gab 2013/09/03 21:05:19 Use BrowserDistribution::GetShortcutName() instead
zturner 2013/09/05 01:35:29 Done.
214 shortcut = shortcut.Append(L"Google Chrome Canary.lnk");
215 else
216 shortcut = shortcut.Append(L"Google Chrome.lnk");
213 #else 217 #else
214 shortcut = shortcut.Append(L"Chromium.lnk"); 218 shortcut = shortcut.Append(L"Chromium.lnk");
215 #endif 219 #endif
216 220
217 string16 arguments; 221 string16 arguments;
218 if (GetArgumentsFromShortcut(shortcut, &arguments)) { 222 if (GetArgumentsFromShortcut(shortcut, &arguments)) {
219 return arguments; 223 return arguments;
220 } 224 }
221 } 225 }
222 226
223 return L""; 227 return L"";
224 } 228 }
225 229
226 } // namespace winrt_utils 230 } // namespace winrt_utils
OLDNEW
« win8/metro_driver/metro_driver.gyp ('K') | « win8/metro_driver/metro_driver.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698