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

Unified Diff: chrome/browser/shell_integration_win.cc

Issue 745333002: Remove implicit conversions from scoped_refptr to T* in chrome/ (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
Index: chrome/browser/shell_integration_win.cc
diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc
index ba767e85e7a85c5d9ed829424ceba9b888f079f4..539c88c19f8b1fd991ac76fbfa7c2767ba23a05b 100644
--- a/chrome/browser/shell_integration_win.cc
+++ b/chrome/browser/shell_integration_win.cc
@@ -476,7 +476,7 @@ int ShellIntegration::MigrateShortcutsInPathInternal(
base::win::ScopedComPtr<IPersistFile> persist_file;
if (FAILED(shell_link.CreateInstance(CLSID_ShellLink, NULL,
CLSCTX_INPROC_SERVER)) ||
- FAILED(persist_file.QueryFrom(shell_link)) ||
+ FAILED(persist_file.QueryFrom(shell_link.get())) ||
FAILED(persist_file->Load(shortcut.value().c_str(), STGM_READ))) {
DLOG(WARNING) << "Failed loading shortcut at " << shortcut.value();
continue;
@@ -489,9 +489,9 @@ int ShellIntegration::MigrateShortcutsInPathInternal(
// Validate the existing app id for the shortcut.
base::win::ScopedComPtr<IPropertyStore> property_store;
propvariant.Reset();
- if (FAILED(property_store.QueryFrom(shell_link)) ||
- property_store->GetValue(PKEY_AppUserModel_ID,
- propvariant.Receive()) != S_OK) {
+ if (FAILED(property_store.QueryFrom(shell_link.get())) ||
+ property_store->GetValue(PKEY_AppUserModel_ID, propvariant.Receive()) !=
Lei Zhang 2014/11/21 17:44:28 nit: the prev code looks more readable to me.
dcheng 2014/11/21 19:12:11 This was the result of clang-format. I'm happy to
+ S_OK) {
// When in doubt, prefer not updating the shortcut.
NOTREACHED();
continue;

Powered by Google App Engine
This is Rietveld 408576698