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

Unified Diff: base/win/shortcut.cc

Issue 2885063003: Remove ScopedComPtr::QueryFrom() (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/win/scoped_comptr.h ('k') | chrome/browser/importer/ie_importer_browsertest_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/shortcut.cc
diff --git a/base/win/shortcut.cc b/base/win/shortcut.cc
index 07f9a29b1317e03b352b9d063fec105bbd6931d2..5b36fbaf5aaa173e1a0c7efbb30b1afb031f2653 100644
--- a/base/win/shortcut.cc
+++ b/base/win/shortcut.cc
@@ -33,7 +33,7 @@ void InitializeShortcutInterfaces(
i_persist_file->Reset();
if (FAILED(i_shell_link->CreateInstance(CLSID_ShellLink, NULL,
CLSCTX_INPROC_SERVER)) ||
- FAILED(i_persist_file->QueryFrom(i_shell_link->Get())) ||
+ FAILED(i_shell_link->CopyTo(i_persist_file->GetAddressOf())) ||
(shortcut && FAILED((*i_persist_file)->Load(shortcut, STGM_READWRITE)))) {
i_shell_link->Reset();
i_persist_file->Reset();
@@ -139,7 +139,7 @@ bool CreateOrUpdateShortcutLink(const FilePath& shortcut_path,
if ((has_app_id || has_dual_mode) &&
GetVersion() >= VERSION_WIN7) {
ScopedComPtr<IPropertyStore> property_store;
- if (FAILED(property_store.QueryFrom(i_shell_link.Get())) ||
+ if (FAILED(i_shell_link.CopyTo(property_store.GetAddressOf())) ||
!property_store.Get())
return false;
@@ -204,7 +204,7 @@ bool ResolveShortcutProperties(const FilePath& shortcut_path,
ScopedComPtr<IPersistFile> persist;
// Query IShellLink for the IPersistFile interface.
- if (FAILED(persist.QueryFrom(i_shell_link.Get())))
+ if (FAILED(i_shell_link.CopyTo(persist.GetAddressOf())))
return false;
// Load the shell link.
@@ -251,7 +251,7 @@ bool ResolveShortcutProperties(const FilePath& shortcut_path,
if ((options & ShortcutProperties::PROPERTIES_WIN7) &&
GetVersion() >= VERSION_WIN7) {
ScopedComPtr<IPropertyStore> property_store;
- if (FAILED(property_store.QueryFrom(i_shell_link.Get())))
+ if (FAILED(i_shell_link.CopyTo(property_store.GetAddressOf())))
return false;
if (options & ShortcutProperties::PROPERTIES_APP_ID) {
« no previous file with comments | « base/win/scoped_comptr.h ('k') | chrome/browser/importer/ie_importer_browsertest_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698