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

Unified Diff: ui/android/resources/resource_manager_impl.h

Issue 2325623003: Replace IDMap with std::unordered_map in ResourceManager (Closed)
Patch Set: nits Created 4 years, 3 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
Index: ui/android/resources/resource_manager_impl.h
diff --git a/ui/android/resources/resource_manager_impl.h b/ui/android/resources/resource_manager_impl.h
index 31d26f5f8f945b94305bb817d8ab30de1e1b5d4e..84e2dd1240a35eb714b3026ab75806bd76951ca7 100644
--- a/ui/android/resources/resource_manager_impl.h
+++ b/ui/android/resources/resource_manager_impl.h
@@ -7,7 +7,6 @@
#include <memory>
-#include "base/id_map.h"
#include "base/macros.h"
#include "ui/android/resources/resource_manager.h"
#include "ui/android/ui_android_export.h"
@@ -86,11 +85,11 @@ class UI_ANDROID_EXPORT ResourceManagerImpl : public ResourceManager {
int metadata_res_id,
bool reloading);
- typedef IDMap<Resource, IDMapOwnPointer> ResourceMap;
- typedef IDMap<CrushedSpriteResource, IDMapOwnPointer>
- CrushedSpriteResourceMap;
- typedef std::unordered_map<int, std::unique_ptr<ResourceMap> >
- TintedResourceMap;
+ using ResourceMap = std::unordered_map<int, std::unique_ptr<Resource> >;
aelias_OOO_until_Jul13 2016/09/09 21:50:05 Please use "AndroidResourceType" instead of raw in
aelias_OOO_until_Jul13 2016/09/09 21:59:45 Sorry, I realized this is not correct. It looks l
mdjones 2016/09/12 16:55:09 At the very least it would help with the understan
+ using CrushedSpriteResourceMap =
+ std::unordered_map<int, std::unique_ptr<CrushedSpriteResource> >;
aelias_OOO_until_Jul13 2016/09/09 21:50:05 nit: no need for space between ">" characters in C
mdjones 2016/09/12 16:55:09 Done.
+ using TintedResourceMap =
+ std::unordered_map<int, std::unique_ptr<ResourceMap> >;
aelias_OOO_until_Jul13 2016/09/09 21:50:05 Please use "SkColor" instead of raw int.
mdjones 2016/09/12 16:55:09 Done.
cc::LayerTreeHost* host_;
ResourceMap resources_[ANDROID_RESOURCE_TYPE_COUNT];
« no previous file with comments | « no previous file | ui/android/resources/resource_manager_impl.cc » ('j') | ui/android/resources/resource_manager_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698