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

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

Issue 776903002: Cleanup: Remove some unneeded string allocations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix win Created 6 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
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 aaa9327f74eff9053e10e58511210feb630a5f79..4865397260acaac1ecee67f5f757ed012bcac32a 100644
--- a/chrome/utility/importer/ie_importer_win.cc
+++ b/chrome/utility/importer/ie_importer_win.cc
@@ -114,7 +114,7 @@ LPCITEMIDLIST BinaryReadItemIDList(size_t offset, size_t idlist_size,
struct IEOrderBookmarkComparator {
bool operator()(const ImportedBookmarkEntry& lhs,
const ImportedBookmarkEntry& rhs) const {
- static const uint32 kNotSorted = 0xfffffffb; // IE uses this magic value.
+ static const uint32 kNotSorted = 0xfffffffb; // IE uses this magic value.
base::FilePath lhs_prefix;
base::FilePath rhs_prefix;
for (size_t i = 0; i <= lhs.path.size() && i <= rhs.path.size(); ++i) {
@@ -184,7 +184,7 @@ bool ParseFavoritesOrderBlob(
// Read the size (number of bytes) of the current item.
uint32 item_size = 0;
if (!BinaryRead(&item_size, base_offset + kSizeOffset, blob) ||
- base_offset + item_size <= base_offset || // checking overflow
+ base_offset + item_size <= base_offset || // checking overflow
base_offset + item_size > blob.size())
return false;
@@ -292,7 +292,7 @@ GURL ReadURLFromInternetShortcut(IUniformResourceLocator* url_locator) {
base::win::ScopedCoMem<wchar_t> url;
// GetURL can return S_FALSE (FAILED(S_FALSE) is false) when url == NULL.
return (FAILED(url_locator->GetURL(&url)) || !url) ?
- GURL() : GURL(base::WideToUTF16(std::wstring(url)));
+ GURL() : GURL(base::WideToUTF16(url.get()));
}
// Reads the URL of the favicon of the internet shortcut.

Powered by Google App Engine
This is Rietveld 408576698