diff options
author | dcheng <dcheng@chromium.org> | 2014-11-21 13:22:28 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-21 21:22:44 +0000 |
commit | 81762e001c5c58b778a883fdace89975db9ee084 (patch) | |
tree | 0876bd52bc4139de3b0f3f332c4822043a7a62f3 | |
parent | 96221b776737fb9a534be5b1e293402db4841a73 (diff) | |
download | chromium_src-81762e001c5c58b778a883fdace89975db9ee084.zip chromium_src-81762e001c5c58b778a883fdace89975db9ee084.tar.gz chromium_src-81762e001c5c58b778a883fdace89975db9ee084.tar.bz2 |
Remove implicit conversions from scoped_refptr to T* in chrome/
This patch was generated by running the rewrite_scoped_refptr clang tool
on a Windows build.
BUG=110610
Review URL: https://codereview.chromium.org/745333002
Cr-Commit-Position: refs/heads/master@{#305286}
-rw-r--r-- | chrome/browser/metro_utils/metro_chrome_win.cc | 2 | ||||
-rw-r--r-- | chrome/browser/shell_integration_win.cc | 8 | ||||
-rw-r--r-- | chrome/browser/ui/pdf/adobe_reader_info_win.cc | 3 |
3 files changed, 7 insertions, 6 deletions
diff --git a/chrome/browser/metro_utils/metro_chrome_win.cc b/chrome/browser/metro_utils/metro_chrome_win.cc index d4985a6..d20a680 100644 --- a/chrome/browser/metro_utils/metro_chrome_win.cc +++ b/chrome/browser/metro_utils/metro_chrome_win.cc @@ -41,7 +41,7 @@ bool ActivateMetroChrome() { base::win::ScopedComPtr<IApplicationActivationManager> activation_manager; HRESULT hr = activation_manager.CreateInstance( CLSID_ApplicationActivationManager); - if (!activation_manager) { + if (!activation_manager.get()) { NOTREACHED() << "Failed to cocreate activation manager. Error: " << std::showbase << std::hex << hr; return false; diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc index ba767e8..539c88c 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()) != + S_OK) { // When in doubt, prefer not updating the shortcut. NOTREACHED(); continue; diff --git a/chrome/browser/ui/pdf/adobe_reader_info_win.cc b/chrome/browser/ui/pdf/adobe_reader_info_win.cc index 5e826d6..ded85bc 100644 --- a/chrome/browser/ui/pdf/adobe_reader_info_win.cc +++ b/chrome/browser/ui/pdf/adobe_reader_info_win.cc @@ -88,7 +88,8 @@ AdobeReaderPluginInfo GetReaderPlugin( reader_info.is_installed = true; if (profile) { - PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(profile); + scoped_refptr<PluginPrefs> plugin_prefs = + PluginPrefs::GetForProfile(profile); PluginPrefs::PolicyStatus plugin_status = plugin_prefs->PolicyStatusForPlugin(plugin_metadata->name()); reader_info.is_enabled = plugin_status != PluginPrefs::POLICY_DISABLED; |