Chromium Code Reviews| 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 6bff0e43845d93df8075d573e2ea1321691effb3..1f7f2190e3b444b9f689c2d11ed04eebc45f8a02 100644 |
| --- a/chrome/utility/importer/ie_importer_win.cc |
| +++ b/chrome/utility/importer/ie_importer_win.cc |
| @@ -160,11 +160,17 @@ struct IEOrderBookmarkComparator { |
| // }; |
| // where each item_id should correspond to a favorites link file (*.url) in |
| // the current folder. |
| -bool ParseFavoritesOrderBlob( |
| - const Importer* importer, |
| - const std::vector<uint8>& blob, |
| - const base::FilePath& path, |
| - std::map<base::FilePath, uint32>* sort_index) WARN_UNUSED_RESULT { |
| +// GCC, in its infinite wisdom, does not allow WARN_UNUSED_RESULT to be used in |
|
Lei Zhang
2015/10/07 16:28:09
What is GCC doing touching a _win.cc file? Did you
dcheng
2015/10/07 16:41:34
GCC only allows function attributes on prototypes.
Lei Zhang
2015/10/07 20:33:11
Can you mention the clang / gcc compatibility issu
dcheng
2015/10/08 03:48:07
Done.
|
| +// a definition. |
| +bool ParseFavoritesOrderBlob(const Importer* importer, |
| + const std::vector<uint8>& blob, |
| + const base::FilePath& path, |
| + std::map<base::FilePath, uint32>* sort_index) |
| + WARN_UNUSED_RESULT; |
| +bool ParseFavoritesOrderBlob(const Importer* importer, |
| + const std::vector<uint8>& blob, |
| + const base::FilePath& path, |
| + std::map<base::FilePath, uint32>* sort_index) { |
| static const int kItemCountOffset = 16; |
| static const int kItemListStartOffset = 20; |
| @@ -212,7 +218,12 @@ bool ParseFavoritesOrderRegistryTree( |
| const Importer* importer, |
| const base::win::RegKey& key, |
| const base::FilePath& path, |
| - std::map<base::FilePath, uint32>* sort_index) WARN_UNUSED_RESULT { |
| + std::map<base::FilePath, uint32>* sort_index) WARN_UNUSED_RESULT; |
| +bool ParseFavoritesOrderRegistryTree( |
| + const Importer* importer, |
| + const base::win::RegKey& key, |
| + const base::FilePath& path, |
| + std::map<base::FilePath, uint32>* sort_index) { |
| // Parse the order information of the current folder. |
| DWORD blob_length = 0; |
| if (key.ReadValue(L"Order", NULL, &blob_length, NULL) == ERROR_SUCCESS) { |
| @@ -241,9 +252,11 @@ bool ParseFavoritesOrderRegistryTree( |
| return true; |
| } |
| -bool ParseFavoritesOrderInfo( |
| - const Importer* importer, |
| - std::map<base::FilePath, uint32>* sort_index) WARN_UNUSED_RESULT { |
| +bool ParseFavoritesOrderInfo(const Importer* importer, |
| + std::map<base::FilePath, uint32>* sort_index) |
| + WARN_UNUSED_RESULT; |
| +bool ParseFavoritesOrderInfo(const Importer* importer, |
| + std::map<base::FilePath, uint32>* sort_index) { |
| base::string16 key_path(importer::GetIEFavoritesOrderKey()); |
| base::win::RegKey key(HKEY_CURRENT_USER, key_path.c_str(), KEY_READ); |
| if (!key.Valid()) |