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

Unified Diff: base/win/shortcut.cc

Issue 750063002: Remove implicit conversions from scoped_refptr to T* in base/ (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/test/test_shortcut_win.cc ('k') | no next file » | 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 eef299b9440fab413bca51e781fc164e63586a30..eb26ceaa4a3f7886ede64aed5d01bcd716bd8c94 100644
--- a/base/win/shortcut.cc
+++ b/base/win/shortcut.cc
@@ -33,7 +33,7 @@ void InitializeShortcutInterfaces(
i_persist_file->Release();
if (FAILED(i_shell_link->CreateInstance(CLSID_ShellLink, NULL,
CLSCTX_INPROC_SERVER)) ||
- FAILED(i_persist_file->QueryFrom(*i_shell_link)) ||
+ FAILED(i_persist_file->QueryFrom(i_shell_link->get())) ||
(shortcut && FAILED((*i_persist_file)->Load(shortcut, STGM_READWRITE)))) {
i_shell_link->Release();
i_persist_file->Release();
@@ -129,15 +129,17 @@ 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)) || !property_store.get())
+ if (FAILED(property_store.QueryFrom(i_shell_link.get())) ||
+ !property_store.get())
return false;
if (has_app_id &&
- !SetAppIdForPropertyStore(property_store, properties.app_id.c_str())) {
+ !SetAppIdForPropertyStore(property_store.get(),
+ properties.app_id.c_str())) {
return false;
}
if (has_dual_mode &&
- !SetBooleanValueForPropertyStore(property_store,
+ !SetBooleanValueForPropertyStore(property_store.get(),
PKEY_AppUserModel_IsDualMode,
properties.dual_mode)) {
return false;
@@ -192,7 +194,7 @@ bool ResolveShortcutProperties(const FilePath& shortcut_path,
ScopedComPtr<IPersistFile> persist;
// Query IShellLink for the IPersistFile interface.
- if (FAILED(persist.QueryFrom(i_shell_link)))
+ if (FAILED(persist.QueryFrom(i_shell_link.get())))
return false;
// Load the shell link.
@@ -239,7 +241,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)))
+ if (FAILED(property_store.QueryFrom(i_shell_link.get())))
return false;
if (options & ShortcutProperties::PROPERTIES_APP_ID) {
« no previous file with comments | « base/test/test_shortcut_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698