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

Unified Diff: chrome/utility/importer/ie_importer_win.cc

Issue 2894483002: Migrate from ScopedComPtr::CreateInstance() to CoCreateInstance in chrome/... (Closed)
Patch Set: Fix Header Include Location Created 3 years, 7 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 | « chrome/installer/util/wmi.cc ('k') | chrome/utility/shell_handler_impl_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/utility/importer/ie_importer_win.cc
diff --git a/chrome/utility/importer/ie_importer_win.cc b/chrome/utility/importer/ie_importer_win.cc
index fdb68abc3be85d1fa60b03346411a2dfe6115c36..d46dbf4abe89a9f56d18287868ecf913bb9ccfb2 100644
--- a/chrome/utility/importer/ie_importer_win.cc
+++ b/chrome/utility/importer/ie_importer_win.cc
@@ -292,8 +292,9 @@ bool LoadInternetShortcut(
const base::string16& file,
base::win::ScopedComPtr<IUniformResourceLocator>* shortcut) {
base::win::ScopedComPtr<IUniformResourceLocator> url_locator;
- if (FAILED(url_locator.CreateInstance(CLSID_InternetShortcut, NULL,
- CLSCTX_INPROC_SERVER)))
+ if (FAILED(::CoCreateInstance(CLSID_InternetShortcut, NULL,
+ CLSCTX_INPROC_SERVER,
+ IID_PPV_ARGS(&url_locator))))
return false;
base::win::ScopedComPtr<IPersistFile> persist_file;
@@ -509,8 +510,8 @@ void IEImporter::ImportHistory() {
int total_schemes = arraysize(kSchemes);
base::win::ScopedComPtr<IUrlHistoryStg2> url_history_stg2;
- if (FAILED(url_history_stg2.CreateInstance(CLSID_CUrlHistory, NULL,
- CLSCTX_INPROC_SERVER))) {
+ if (FAILED(::CoCreateInstance(CLSID_CUrlHistory, NULL, CLSCTX_INPROC_SERVER,
+ IID_PPV_ARGS(&url_history_stg2)))) {
return;
}
base::win::ScopedComPtr<IEnumSTATURL> enum_url;
« no previous file with comments | « chrome/installer/util/wmi.cc ('k') | chrome/utility/shell_handler_impl_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698