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

Unified Diff: chrome/browser/importer/ie_importer.cc

Issue 8775053: importer: Convert ResolveInternetShortcut() to string16. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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/browser/importer/ie_importer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/importer/ie_importer.cc
diff --git a/chrome/browser/importer/ie_importer.cc b/chrome/browser/importer/ie_importer.cc
index 90810d1515f6a8555eb26ca3f71361c1d71b8054..60eb0a1052c49be466f8c2063f5e8f98a2ffe389 100644
--- a/chrome/browser/importer/ie_importer.cc
+++ b/chrome/browser/importer/ie_importer.cc
@@ -462,30 +462,30 @@ void IEImporter::ImportHomepage() {
bridge_->AddHomePage(homepage);
}
-std::wstring IEImporter::ResolveInternetShortcut(const std::wstring& file) {
+string16 IEImporter::ResolveInternetShortcut(const string16& file) {
base::win::ScopedCoMem<wchar_t> url;
base::win::ScopedComPtr<IUniformResourceLocator> url_locator;
HRESULT result = url_locator.CreateInstance(CLSID_InternetShortcut, NULL,
CLSCTX_INPROC_SERVER);
if (FAILED(result))
- return std::wstring();
+ return string16();
base::win::ScopedComPtr<IPersistFile> persist_file;
result = persist_file.QueryFrom(url_locator);
if (FAILED(result))
- return std::wstring();
+ return string16();
// Loads the Internet Shortcut from persistent storage.
result = persist_file->Load(file.c_str(), STGM_READ);
if (FAILED(result))
- return std::wstring();
+ return string16();
result = url_locator->GetURL(&url);
// GetURL can return S_FALSE (FAILED(S_FALSE) is false) when url == NULL.
if (FAILED(result) || (url == NULL))
- return std::wstring();
+ return string16();
- return std::wstring(url);
+ return string16(url);
}
bool IEImporter::GetFavoritesInfo(IEImporter::FavoritesInfo* info) {
« no previous file with comments | « chrome/browser/importer/ie_importer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698