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

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

Issue 753743003: Remove remaining implicit scoped_ptr<T> to T* conversions in win8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | win8/viewer/metro_viewer_process_host.h » ('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 "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"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 177
178 178
179 base::win::ScopedCOMInitializer sta_com_initializer; 179 base::win::ScopedCOMInitializer sta_com_initializer;
180 180
181 // Get pointer to the IShellLink interface 181 // Get pointer to the IShellLink interface
182 result = i_shell_link.CreateInstance(CLSID_ShellLink, NULL, 182 result = i_shell_link.CreateInstance(CLSID_ShellLink, NULL,
183 CLSCTX_INPROC_SERVER); 183 CLSCTX_INPROC_SERVER);
184 if (SUCCEEDED(result)) { 184 if (SUCCEEDED(result)) {
185 base::win::ScopedComPtr<IPersistFile> persist; 185 base::win::ScopedComPtr<IPersistFile> persist;
186 // Query IShellLink for the IPersistFile interface 186 // Query IShellLink for the IPersistFile interface
187 result = persist.QueryFrom(i_shell_link); 187 result = persist.QueryFrom(i_shell_link.get());
188 if (SUCCEEDED(result)) { 188 if (SUCCEEDED(result)) {
189 WCHAR temp_arguments[MAX_PATH]; 189 WCHAR temp_arguments[MAX_PATH];
190 // Load the shell link 190 // Load the shell link
191 result = persist->Load(shortcut.value().c_str(), STGM_READ); 191 result = persist->Load(shortcut.value().c_str(), STGM_READ);
192 if (SUCCEEDED(result)) { 192 if (SUCCEEDED(result)) {
193 result = i_shell_link->GetArguments(temp_arguments, MAX_PATH); 193 result = i_shell_link->GetArguments(temp_arguments, MAX_PATH);
194 *arguments = temp_arguments; 194 *arguments = temp_arguments;
195 is_resolved = true; 195 is_resolved = true;
196 } 196 }
197 } 197 }
(...skipping 19 matching lines...) Expand all
217 base::string16 arguments; 217 base::string16 arguments;
218 if (GetArgumentsFromShortcut(shortcut, &arguments)) { 218 if (GetArgumentsFromShortcut(shortcut, &arguments)) {
219 return arguments; 219 return arguments;
220 } 220 }
221 } 221 }
222 222
223 return L""; 223 return L"";
224 } 224 }
225 225
226 } // namespace winrt_utils 226 } // namespace winrt_utils
OLDNEW
« no previous file with comments | « no previous file | win8/viewer/metro_viewer_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698