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

Unified Diff: base/win/shortcut.cc

Issue 2792383003: Rename ScopedComPtr::Release() to ScopedComPtr::Reset() (Closed)
Patch Set: Fix New Callers Created 3 years, 8 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_unittest.cc ('k') | chrome/browser/google/google_update_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 f574809996498dfc390429e43c79adc6d818acc7..856b00f0f59d60171ce30940d5a30c34a1509562 100644
--- a/base/win/shortcut.cc
+++ b/base/win/shortcut.cc
@@ -29,14 +29,14 @@ void InitializeShortcutInterfaces(
const wchar_t* shortcut,
ScopedComPtr<IShellLink>* i_shell_link,
ScopedComPtr<IPersistFile>* i_persist_file) {
- i_shell_link->Release();
- i_persist_file->Release();
+ i_shell_link->Reset();
+ 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())) ||
(shortcut && FAILED((*i_persist_file)->Load(shortcut, STGM_READWRITE)))) {
- i_shell_link->Release();
- i_persist_file->Release();
+ i_shell_link->Reset();
+ i_persist_file->Reset();
}
}
@@ -158,15 +158,15 @@ bool CreateOrUpdateShortcutLink(const FilePath& shortcut_path,
// Release the interfaces to the old shortcut to make sure it doesn't prevent
// overwriting it if needed.
- old_i_persist_file.Release();
- old_i_shell_link.Release();
+ old_i_persist_file.Reset();
+ old_i_shell_link.Reset();
HRESULT result = i_persist_file->Save(shortcut_path.value().c_str(), TRUE);
// Release the interfaces in case the SHChangeNotify call below depends on
// the operations above being fully completed.
- i_persist_file.Release();
- i_shell_link.Release();
+ i_persist_file.Reset();
+ i_shell_link.Reset();
// If we successfully created/updated the icon, notify the shell that we have
// done so.
« no previous file with comments | « base/win/scoped_comptr_unittest.cc ('k') | chrome/browser/google/google_update_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698