diff options
author | dcheng <dcheng@chromium.org> | 2014-11-21 13:01:49 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-21 21:02:13 +0000 |
commit | f3c56d51dac268caa4186b27eb3f738ce85b8d20 (patch) | |
tree | 2e230ea7d6d544af41f77cf5a13496ef2f45b39c | |
parent | 77643d1900767103dbcfdb6a988141c4cd02aa45 (diff) | |
download | chromium_src-f3c56d51dac268caa4186b27eb3f738ce85b8d20.zip chromium_src-f3c56d51dac268caa4186b27eb3f738ce85b8d20.tar.gz chromium_src-f3c56d51dac268caa4186b27eb3f738ce85b8d20.tar.bz2 |
Remove implicit conversions from scoped_refptr to T* in base/
This patch was generated by running the rewrite_scoped_refptr clang tool
on a Windows build.
BUG=110610
Review URL: https://codereview.chromium.org/750063002
Cr-Commit-Position: refs/heads/master@{#305277}
-rw-r--r-- | base/test/test_shortcut_win.cc | 4 | ||||
-rw-r--r-- | base/win/shortcut.cc | 14 |
2 files changed, 10 insertions, 8 deletions
diff --git a/base/test/test_shortcut_win.cc b/base/test/test_shortcut_win.cc index c772d87..eb074a3 100644 --- a/base/test/test_shortcut_win.cc +++ b/base/test/test_shortcut_win.cc @@ -67,7 +67,7 @@ void ValidateShortcut(const base::FilePath& shortcut_path, if (FAILED(hr)) return; - EXPECT_TRUE(SUCCEEDED(hr = i_persist_file.QueryFrom(i_shell_link))); + EXPECT_TRUE(SUCCEEDED(hr = i_persist_file.QueryFrom(i_shell_link.get()))); if (FAILED(hr)) return; @@ -112,7 +112,7 @@ void ValidateShortcut(const base::FilePath& shortcut_path, if (GetVersion() >= VERSION_WIN7) { ScopedComPtr<IPropertyStore> property_store; - EXPECT_TRUE(SUCCEEDED(hr = property_store.QueryFrom(i_shell_link))); + EXPECT_TRUE(SUCCEEDED(hr = property_store.QueryFrom(i_shell_link.get()))); if (FAILED(hr)) return; diff --git a/base/win/shortcut.cc b/base/win/shortcut.cc index eef299b..eb26cea 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) { |