Replace base::hash_map with std::unordered_map
base::hash_map is alias of std::unordered_map now.
I applied following command to make this CL.
$ git grep -l 'base::hash_map' | fgrep -v base/ | xargs sed -i -e 's/base::hash_map/std::unordered_set/g' -e 's/\(#include <[a-z_]*>\)/\1\n#include <unordered_map>/' -e 's/BASE_HASH_NAMESPACE/std/'
$ git cl format
$ # Added IntPairHash and replaced BASE_HASH_NAMESPACE with std in some places.
TBR: [email protected]
Bug: 576864
Change-Id: I38941d9f9bcb05ec474b8dee5230c4c5dcd2211f
Reviewed-on: https://chromium-review.googlesource.com/c/1390892
Commit-Queue: Takuto Ikuta <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Cr-Commit-Position: refs/heads/master@{#620124}
diff --git a/android_webview/browser/aw_permission_manager.cc b/android_webview/browser/aw_permission_manager.cc
index 3a101d39..df85ddee4 100644
--- a/android_webview/browser/aw_permission_manager.cc
+++ b/android_webview/browser/aw_permission_manager.cc
@@ -6,6 +6,7 @@
#include <memory>
#include <string>
+#include <unordered_map>
#include <utility>
#include "android_webview/browser/aw_browser_permission_request_delegate.h"
@@ -142,7 +143,7 @@
return requesting + "," + embedding;
}
- using StatusMap = base::hash_map<std::string, PermissionStatus>;
+ using StatusMap = std::unordered_map<std::string, PermissionStatus>;
StatusMap pmi_result_cache_;
DISALLOW_COPY_AND_ASSIGN(LastRequestResultCache);
diff --git a/chromeos/cryptohome/async_method_caller.cc b/chromeos/cryptohome/async_method_caller.cc
index 6d6df50..81035ec 100644
--- a/chromeos/cryptohome/async_method_caller.cc
+++ b/chromeos/cryptohome/async_method_caller.cc
@@ -163,8 +163,8 @@
scoped_refptr<base::SingleThreadTaskRunner> task_runner;
};
- typedef base::hash_map<int, CallbackElement> CallbackMap;
- typedef base::hash_map<int, DataCallbackElement> DataCallbackMap;
+ typedef std::unordered_map<int, CallbackElement> CallbackMap;
+ typedef std::unordered_map<int, DataCallbackElement> DataCallbackMap;
// Handles the response for async calls.
// Below is described how async calls work.
diff --git a/components/discardable_memory/common/discardable_shared_memory_heap.h b/components/discardable_memory/common/discardable_shared_memory_heap.h
index 8c9ff8d..bdff97e 100644
--- a/components/discardable_memory/common/discardable_shared_memory_heap.h
+++ b/components/discardable_memory/common/discardable_shared_memory_heap.h
@@ -9,6 +9,7 @@
#include <stdint.h>
#include <memory>
+#include <unordered_map>
#include <vector>
#include "base/callback.h"
@@ -163,7 +164,7 @@
std::vector<std::unique_ptr<ScopedMemorySegment>> memory_segments_;
// Mapping from first/last block of span to Span instance.
- typedef base::hash_map<size_t, Span*> SpanMap;
+ typedef std::unordered_map<size_t, Span*> SpanMap;
SpanMap spans_;
// Array of linked-lists with free discardable memory regions. For i < 256,
diff --git a/components/discardable_memory/service/discardable_shared_memory_manager.h b/components/discardable_memory/service/discardable_shared_memory_manager.h
index c3b1d06..ebc8e670 100644
--- a/components/discardable_memory/service/discardable_shared_memory_manager.h
+++ b/components/discardable_memory/service/discardable_shared_memory_manager.h
@@ -9,6 +9,7 @@
#include <stdint.h>
#include <memory>
+#include <unordered_map>
#include <vector>
#include "base/callback.h"
@@ -141,8 +142,8 @@
base::Lock lock_;
using MemorySegmentMap =
- base::hash_map<int32_t, scoped_refptr<MemorySegment>>;
- using ClientMap = base::hash_map<int, MemorySegmentMap>;
+ std::unordered_map<int32_t, scoped_refptr<MemorySegment>>;
+ using ClientMap = std::unordered_map<int, MemorySegmentMap>;
ClientMap clients_;
// Note: The elements in |segments_| are arranged in such a way that they form
// a heap. The LRU memory segment always first.
diff --git a/components/dom_distiller/core/distilled_content_store.h b/components/dom_distiller/core/distilled_content_store.h
index bbee232..ed8272d7 100644
--- a/components/dom_distiller/core/distilled_content_store.h
+++ b/components/dom_distiller/core/distilled_content_store.h
@@ -7,6 +7,7 @@
#include <memory>
#include <string>
+#include <unordered_map>
#include "base/bind.h"
#include "base/containers/hash_tables.h"
@@ -81,7 +82,7 @@
std::unique_ptr<DistilledArticleProto, CacheDeletor>>
ContentMap;
- typedef base::hash_map<std::string, std::string> UrlMap;
+ typedef std::unordered_map<std::string, std::string> UrlMap;
ContentMap cache_;
UrlMap url_to_id_;
diff --git a/components/dom_distiller/core/distiller.h b/components/dom_distiller/core/distiller.h
index 77465ab..7801c01 100644
--- a/components/dom_distiller/core/distiller.h
+++ b/components/dom_distiller/core/distiller.h
@@ -10,6 +10,7 @@
#include <map>
#include <memory>
#include <string>
+#include <unordered_map>
#include <vector>
#include "base/callback.h"
@@ -172,7 +173,7 @@
// Maps page numbers of pages under distillation to the indices in |pages_|.
// If a page is |started_pages_| that means it is still waiting for an action
// (distillation or image fetch) to finish.
- base::hash_map<int, size_t> started_pages_index_;
+ std::unordered_map<int, size_t> started_pages_index_;
// The list of pages that are still waiting for distillation to start.
// This is a map, to make distiller prefer distilling lower page numbers
diff --git a/components/dom_distiller/core/dom_distiller_model.h b/components/dom_distiller/core/dom_distiller_model.h
index cff3820c..6c357bb 100644
--- a/components/dom_distiller/core/dom_distiller_model.h
+++ b/components/dom_distiller/core/dom_distiller_model.h
@@ -9,6 +9,7 @@
#include <stdint.h>
#include <string>
+#include <unordered_map>
#include <vector>
#include "base/containers/hash_tables.h"
@@ -62,8 +63,8 @@
private:
typedef int32_t KeyType;
- typedef base::hash_map<KeyType, ArticleEntry> EntryMap;
- typedef base::hash_map<std::string, KeyType> StringToKeyMap;
+ typedef std::unordered_map<KeyType, ArticleEntry> EntryMap;
+ typedef std::unordered_map<std::string, KeyType> StringToKeyMap;
void AddEntry(const ArticleEntry& entry);
void RemoveEntry(const ArticleEntry& entry);
diff --git a/components/dom_distiller/standalone/content_extractor_browsertest.cc b/components/dom_distiller/standalone/content_extractor_browsertest.cc
index 999d6e4..aa71a04b 100644
--- a/components/dom_distiller/standalone/content_extractor_browsertest.cc
+++ b/components/dom_distiller/standalone/content_extractor_browsertest.cc
@@ -4,6 +4,7 @@
#include <stddef.h>
#include <sstream>
+#include <unordered_map>
#include <utility>
#include "base/command_line.h"
@@ -48,8 +49,7 @@
namespace {
-typedef base::hash_map<std::string, std::string> FileToUrlMap;
-
+typedef std::unordered_map<std::string, std::string> FileToUrlMap;
}
// Factory for creating a Distiller that creates different DomDistillerOptions
diff --git a/components/drive/resource_metadata_storage.cc b/components/drive/resource_metadata_storage.cc
index 6f8f3bf..f9050ab 100644
--- a/components/drive/resource_metadata_storage.cc
+++ b/components/drive/resource_metadata_storage.cc
@@ -8,6 +8,7 @@
#include <map>
#include <set>
+#include <unordered_map>
#include <utility>
#include "base/bind.h"
@@ -1124,7 +1125,7 @@
}
// First scan. Remember relationships between IDs.
- typedef base::hash_map<std::string, std::string> KeyToIdMapping;
+ typedef std::unordered_map<std::string, std::string> KeyToIdMapping;
KeyToIdMapping local_id_to_resource_id_map;
KeyToIdMapping child_key_to_local_id_map;
std::set<std::string> resource_entries;
diff --git a/components/omnibox/browser/in_memory_url_index_types.h b/components/omnibox/browser/in_memory_url_index_types.h
index c8e933547..db8e31a4 100644
--- a/components/omnibox/browser/in_memory_url_index_types.h
+++ b/components/omnibox/browser/in_memory_url_index_types.h
@@ -8,6 +8,7 @@
#include <stddef.h>
#include <map>
+#include <unordered_map>
#include <vector>
#include "base/containers/flat_set.h"
@@ -167,7 +168,7 @@
};
// A map from history_id to the history's URL and title.
-typedef base::hash_map<HistoryID, HistoryInfoMapValue> HistoryInfoMap;
+typedef std::unordered_map<HistoryID, HistoryInfoMapValue> HistoryInfoMap;
// A map from history_id to URL and page title word start metrics.
struct RowWordStarts {
diff --git a/components/prefs/pref_notifier_impl.h b/components/prefs/pref_notifier_impl.h
index 77dfaf4..d7473bfe 100644
--- a/components/prefs/pref_notifier_impl.h
+++ b/components/prefs/pref_notifier_impl.h
@@ -8,6 +8,7 @@
#include <list>
#include <memory>
#include <string>
+#include <unordered_map>
#include "base/callback.h"
#include "base/compiler_specific.h"
@@ -58,7 +59,7 @@
// order they are added. These should only be accessed externally for unit
// testing.
typedef base::ObserverList<PrefObserver>::Unchecked PrefObserverList;
- typedef base::hash_map<std::string, std::unique_ptr<PrefObserverList>>
+ typedef std::unordered_map<std::string, std::unique_ptr<PrefObserverList>>
PrefObserverMap;
typedef std::list<base::OnceCallback<void(bool)>> PrefInitObserverList;
diff --git a/components/prefs/pref_registry.h b/components/prefs/pref_registry.h
index c7515aa..5deb6c3d 100644
--- a/components/prefs/pref_registry.h
+++ b/components/prefs/pref_registry.h
@@ -9,6 +9,7 @@
#include <memory>
#include <set>
+#include <unordered_map>
#include "base/containers/hash_tables.h"
#include "base/macros.h"
@@ -54,7 +55,7 @@
};
typedef PrefValueMap::const_iterator const_iterator;
- typedef base::hash_map<std::string, uint32_t> PrefRegistrationFlagsMap;
+ typedef std::unordered_map<std::string, uint32_t> PrefRegistrationFlagsMap;
PrefRegistry();
diff --git a/components/prefs/pref_service.h b/components/prefs/pref_service.h
index 1d7e024..9c3b950 100644
--- a/components/prefs/pref_service.h
+++ b/components/prefs/pref_service.h
@@ -16,6 +16,7 @@
#include <memory>
#include <set>
#include <string>
+#include <unordered_map>
#include <vector>
#include "base/callback.h"
@@ -390,7 +391,7 @@
// string comparisons. Order is unimportant, and deletions are rare.
// Confirmed on Android where this speeded Chrome startup by roughly 50ms
// vs. std::map, and by roughly 180ms vs. std::set of Preference pointers.
- typedef base::hash_map<std::string, Preference> PreferenceMap;
+ typedef std::unordered_map<std::string, Preference> PreferenceMap;
// Give access to ReportUserPrefChanged() and GetMutableUserPref().
friend class subtle::ScopedUserPrefUpdateBase;
diff --git a/components/safe_browsing/browser/threat_details.h b/components/safe_browsing/browser/threat_details.h
index ad70b614..8d18c10 100644
--- a/components/safe_browsing/browser/threat_details.h
+++ b/components/safe_browsing/browser/threat_details.h
@@ -13,6 +13,7 @@
#include <memory>
#include <string>
+#include <unordered_map>
#include <unordered_set>
#include <vector>
@@ -45,23 +46,25 @@
class ThreatDetailsRedirectsCollector;
class ThreatDetailsFactory;
-using ResourceMap =
- base::hash_map<std::string,
- std::unique_ptr<ClientSafeBrowsingReportRequest::Resource>>;
+using ResourceMap = std::unordered_map<
+ std::string,
+ std::unique_ptr<ClientSafeBrowsingReportRequest::Resource>>;
// Maps a key of an HTML element to its corresponding HTMLElement proto message.
// HTML Element keys have the form "<frame_id>-<node_id>", where |frame_id| is
// the FrameTreeNode ID of the frame containing the element, and
// |node_id| is a sequential ID for the element generated by the renderer.
-using ElementMap = base::hash_map<std::string, std::unique_ptr<HTMLElement>>;
+using ElementMap =
+ std::unordered_map<std::string, std::unique_ptr<HTMLElement>>;
// Maps the key of an iframe element to the FrameTreeNode ID of the frame that
// rendered the contents of the iframe.
-using KeyToFrameTreeIdMap = base::hash_map<std::string, int>;
+using KeyToFrameTreeIdMap = std::unordered_map<std::string, int>;
// Maps a FrameTreeNode ID of a frame to a set of child IDs. The child IDs are
// the Element IDs of the top-level HTML Elements in this frame.
-using FrameTreeIdToChildIdsMap = base::hash_map<int, std::unordered_set<int>>;
+using FrameTreeIdToChildIdsMap =
+ std::unordered_map<int, std::unordered_set<int>>;
// Callback used to notify a caller that ThreatDetails has finished creating and
// sending a report.
diff --git a/components/safe_browsing/browser/threat_details_cache.h b/components/safe_browsing/browser/threat_details_cache.h
index 70181aa..7cac4b13 100644
--- a/components/safe_browsing/browser/threat_details_cache.h
+++ b/components/safe_browsing/browser/threat_details_cache.h
@@ -9,6 +9,7 @@
// An instance of this class is generated by ThreatDetails.
#include <string>
+#include <unordered_map>
#include <vector>
#include "base/callback.h"
@@ -24,7 +25,7 @@
namespace safe_browsing {
// Maps a URL to its Resource.
-typedef base::hash_map<
+typedef std::unordered_map<
std::string,
std::unique_ptr<ClientSafeBrowsingReportRequest::Resource>>
ResourceMap;
diff --git a/components/safe_browsing/db/v4_database_unittest.cc b/components/safe_browsing/db/v4_database_unittest.cc
index 6de1f7517..67c7fca 100644
--- a/components/safe_browsing/db/v4_database_unittest.cc
+++ b/components/safe_browsing/db/v4_database_unittest.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <unordered_map>
#include <utility>
#include "base/bind.h"
@@ -210,7 +211,7 @@
DatabaseUpdatedCallback callback_db_updated_;
NewDatabaseReadyCallback callback_db_ready_;
StoreStateMap expected_store_state_map_;
- base::hash_map<ListIdentifier, V4Store*> old_stores_map_;
+ std::unordered_map<ListIdentifier, V4Store*> old_stores_map_;
const ListIdentifier linux_malware_id_, win_malware_id_;
};
diff --git a/components/services/font/public/cpp/font_loader.h b/components/services/font/public/cpp/font_loader.h
index 34695af..633931d6 100644
--- a/components/services/font/public/cpp/font_loader.h
+++ b/components/services/font/public/cpp/font_loader.h
@@ -99,7 +99,7 @@
base::Lock lock_;
// Maps font identity ID to the memory-mapped file with font data.
- base::hash_map<uint32_t, internal::MappedFontFile*> mapped_font_files_;
+ std::unordered_map<uint32_t, internal::MappedFontFile*> mapped_font_files_;
DISALLOW_COPY_AND_ASSIGN(FontLoader);
};
diff --git a/components/sync_preferences/pref_model_associator.h b/components/sync_preferences/pref_model_associator.h
index 46c4b5a..b5698dc 100644
--- a/components/sync_preferences/pref_model_associator.h
+++ b/components/sync_preferences/pref_model_associator.h
@@ -9,6 +9,7 @@
#include <memory>
#include <set>
#include <string>
+#include <unordered_map>
#include <vector>
#include "base/callback.h"
@@ -197,7 +198,7 @@
// from sync.
using SyncedPrefObserverList =
base::ObserverList<SyncedPrefObserver>::Unchecked;
- base::hash_map<std::string, std::unique_ptr<SyncedPrefObserverList>>
+ std::unordered_map<std::string, std::unique_ptr<SyncedPrefObserverList>>
synced_pref_observers_;
const PrefModelAssociatorClient* client_; // Weak.
diff --git a/components/variations/service/variations_field_trial_creator.h b/components/variations/service/variations_field_trial_creator.h
index ea807e5e..38a16ff 100644
--- a/components/variations/service/variations_field_trial_creator.h
+++ b/components/variations/service/variations_field_trial_creator.h
@@ -8,6 +8,7 @@
#include <memory>
#include <set>
#include <string>
+#include <unordered_map>
#include <vector>
#include "base/compiler_specific.h"
@@ -174,7 +175,7 @@
// Caches the UI strings which need to be overridden in the resource bundle.
// These strings are cached before the resource bundle is initialized.
- base::hash_map<int, base::string16> overridden_strings_map_;
+ std::unordered_map<int, base::string16> overridden_strings_map_;
SEQUENCE_CHECKER(sequence_checker_);
diff --git a/content/browser/accessibility/browser_accessibility_android.cc b/content/browser/accessibility/browser_accessibility_android.cc
index 2eb5ea3..82e2bc6 100644
--- a/content/browser/accessibility/browser_accessibility_android.cc
+++ b/content/browser/accessibility/browser_accessibility_android.cc
@@ -107,7 +107,7 @@
return new BrowserAccessibilityAndroid();
}
-using UniqueIdMap = base::hash_map<int32_t, BrowserAccessibilityAndroid*>;
+using UniqueIdMap = std::unordered_map<int32_t, BrowserAccessibilityAndroid*>;
// Map from each AXPlatformNode's unique id to its instance.
base::LazyInstance<UniqueIdMap>::Leaky g_unique_id_map =
LAZY_INSTANCE_INITIALIZER;
diff --git a/content/browser/accessibility/browser_accessibility_manager.h b/content/browser/accessibility/browser_accessibility_manager.h
index c1e9c2d..43f2aee 100644
--- a/content/browser/accessibility/browser_accessibility_manager.h
+++ b/content/browser/accessibility/browser_accessibility_manager.h
@@ -9,6 +9,7 @@
#include <memory>
#include <string>
+#include <unordered_map>
#include <vector>
#include "base/callback_forward.h"
@@ -416,7 +417,7 @@
std::unique_ptr<ui::AXSerializableTree> tree_;
// A mapping from a node id to its wrapper of type BrowserAccessibility.
- base::hash_map<int32_t, BrowserAccessibility*> id_wrapper_map_;
+ std::unordered_map<int32_t, BrowserAccessibility*> id_wrapper_map_;
// True if the user has initiated a navigation to another page.
bool user_is_navigating_away_;
diff --git a/content/browser/accessibility/web_contents_accessibility_android.cc b/content/browser/accessibility/web_contents_accessibility_android.cc
index 91902e59..8bbfa86a7 100644
--- a/content/browser/accessibility/web_contents_accessibility_android.cc
+++ b/content/browser/accessibility/web_contents_accessibility_android.cc
@@ -186,7 +186,7 @@
UMA_ACCESSIBILITYSERVICEINFO_MAX)
using SearchKeyToPredicateMap =
- base::hash_map<base::string16, AccessibilityMatchPredicate>;
+ std::unordered_map<base::string16, AccessibilityMatchPredicate>;
base::LazyInstance<SearchKeyToPredicateMap>::Leaky
g_search_key_to_predicate_map = LAZY_INSTANCE_INITIALIZER;
base::LazyInstance<base::string16>::Leaky g_all_search_keys =
diff --git a/content/browser/appcache/appcache_backend_impl.h b/content/browser/appcache/appcache_backend_impl.h
index cf5b8e8..8f45e728 100644
--- a/content/browser/appcache/appcache_backend_impl.h
+++ b/content/browser/appcache/appcache_backend_impl.h
@@ -56,7 +56,7 @@
return (it != hosts_.end()) ? (it->second.get()) : nullptr;
}
- using HostMap = base::hash_map<int, std::unique_ptr<AppCacheHost>>;
+ using HostMap = std::unordered_map<int, std::unique_ptr<AppCacheHost>>;
const HostMap& hosts() { return hosts_; }
// The AppCacheHost is precreated by the AppCacheNavigationHandleCore class
diff --git a/content/browser/appcache/appcache_working_set.h b/content/browser/appcache/appcache_working_set.h
index 4d8fa0a..246ae77 100644
--- a/content/browser/appcache/appcache_working_set.h
+++ b/content/browser/appcache/appcache_working_set.h
@@ -8,6 +8,7 @@
#include <stdint.h>
#include <map>
+#include <unordered_map>
#include "base/containers/hash_tables.h"
#include "content/common/content_export.h"
@@ -58,9 +59,9 @@
}
private:
- using CacheMap = base::hash_map<int64_t, AppCache*>;
+ using CacheMap = std::unordered_map<int64_t, AppCache*>;
using GroupsByOriginMap = std::map<url::Origin, GroupMap>;
- using ResponseInfoMap = base::hash_map<int64_t, AppCacheResponseInfo*>;
+ using ResponseInfoMap = std::unordered_map<int64_t, AppCacheResponseInfo*>;
GroupMap* GetMutableGroupsInOrigin(const url::Origin& origin) {
GroupsByOriginMap::iterator it = groups_by_origin_.find(origin);
diff --git a/content/browser/appcache/mock_appcache_storage.h b/content/browser/appcache/mock_appcache_storage.h
index 80cc4ba..03d80e4 100644
--- a/content/browser/appcache/mock_appcache_storage.h
+++ b/content/browser/appcache/mock_appcache_storage.h
@@ -9,6 +9,7 @@
#include <map>
#include <memory>
+#include <unordered_map>
#include <vector>
#include "base/callback.h"
@@ -94,7 +95,7 @@
friend class appcache_update_job_unittest::AppCacheUpdateJobTest;
friend class MockAppCacheStorageTest;
- using StoredCacheMap = base::hash_map<int64_t, scoped_refptr<AppCache>>;
+ using StoredCacheMap = std::unordered_map<int64_t, scoped_refptr<AppCache>>;
using StoredGroupMap = std::map<GURL, scoped_refptr<AppCacheGroup>>;
using DoomedResponseIds = std::set<int64_t>;
using StoredEvictionTimesMap =
diff --git a/content/browser/browsing_instance.h b/content/browser/browsing_instance.h
index 118f1781b..879409c 100644
--- a/content/browser/browsing_instance.h
+++ b/content/browser/browsing_instance.h
@@ -8,6 +8,7 @@
#include <stddef.h>
#include <string>
+#include <unordered_map>
#include "base/containers/hash_tables.h"
#include "base/gtest_prod_util.h"
@@ -107,7 +108,7 @@
// Map of site to SiteInstance, to ensure we only have one SiteInstance per
// site.
- typedef base::hash_map<std::string, SiteInstanceImpl*> SiteInstanceMap;
+ typedef std::unordered_map<std::string, SiteInstanceImpl*> SiteInstanceMap;
// Common browser context to which all SiteInstances in this BrowsingInstance
// must belong.
diff --git a/content/browser/frame_host/frame_tree.h b/content/browser/frame_host/frame_tree.h
index 7e74912..03b4f49 100644
--- a/content/browser/frame_host/frame_tree.h
+++ b/content/browser/frame_host/frame_tree.h
@@ -10,6 +10,7 @@
#include <iterator>
#include <memory>
#include <string>
+#include <unordered_map>
#include "base/callback.h"
#include "base/containers/queue.h"
@@ -247,7 +248,7 @@
private:
friend class FrameTreeTest;
FRIEND_TEST_ALL_PREFIXES(RenderFrameHostImplBrowserTest, RemoveFocusedFrame);
- typedef base::hash_map<int, RenderViewHostImpl*> RenderViewHostMap;
+ typedef std::unordered_map<int, RenderViewHostImpl*> RenderViewHostMap;
// Returns a range to iterate over all FrameTreeNodes in the frame tree in
// breadth-first traversal order, skipping the subtree rooted at
diff --git a/content/browser/frame_host/frame_tree_node.cc b/content/browser/frame_host/frame_tree_node.cc
index 413bfeb..4647d212 100644
--- a/content/browser/frame_host/frame_tree_node.cc
+++ b/content/browser/frame_host/frame_tree_node.cc
@@ -7,6 +7,7 @@
#include <math.h>
#include <queue>
+#include <unordered_map>
#include <utility>
#include "base/feature_list.h"
@@ -34,7 +35,7 @@
// This is a global map between frame_tree_node_ids and pointers to
// FrameTreeNodes.
-typedef base::hash_map<int, FrameTreeNode*> FrameTreeNodeIdMap;
+typedef std::unordered_map<int, FrameTreeNode*> FrameTreeNodeIdMap;
base::LazyInstance<FrameTreeNodeIdMap>::DestructorAtExit
g_frame_tree_node_id_map = LAZY_INSTANCE_INITIALIZER;
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index f3a5b7331..b2cc9269 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -5,6 +5,7 @@
#include "content/browser/frame_host/render_frame_host_impl.h"
#include <algorithm>
+#include <unordered_map>
#include <utility>
#include "base/bind.h"
@@ -12,6 +13,7 @@
#include "base/containers/hash_tables.h"
#include "base/containers/queue.h"
#include "base/debug/alias.h"
+#include "base/hash.h"
#include "base/lazy_instance.h"
#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
@@ -224,7 +226,9 @@
// The (process id, routing id) pair that identifies one RenderFrame.
typedef std::pair<int32_t, int32_t> RenderFrameHostID;
-typedef base::hash_map<RenderFrameHostID, RenderFrameHostImpl*>
+typedef std::unordered_map<RenderFrameHostID,
+ RenderFrameHostImpl*,
+ base::IntPairHash<RenderFrameHostID>>
RoutingIDFrameMap;
base::LazyInstance<RoutingIDFrameMap>::DestructorAtExit g_routing_id_frame_map =
LAZY_INSTANCE_INITIALIZER;
@@ -232,9 +236,9 @@
base::LazyInstance<RenderFrameHostImpl::CreateNetworkFactoryCallback>::Leaky
g_create_network_factory_callback_for_test = LAZY_INSTANCE_INITIALIZER;
-using TokenFrameMap = base::hash_map<base::UnguessableToken,
- RenderFrameHostImpl*,
- base::UnguessableTokenHash>;
+using TokenFrameMap = std::unordered_map<base::UnguessableToken,
+ RenderFrameHostImpl*,
+ base::UnguessableTokenHash>;
base::LazyInstance<TokenFrameMap>::Leaky g_token_frame_map =
LAZY_INSTANCE_INITIALIZER;
diff --git a/content/browser/frame_host/render_frame_proxy_host.cc b/content/browser/frame_host/render_frame_proxy_host.cc
index 46c6f8f..07e4c96 100644
--- a/content/browser/frame_host/render_frame_proxy_host.cc
+++ b/content/browser/frame_host/render_frame_proxy_host.cc
@@ -4,10 +4,12 @@
#include "content/browser/frame_host/render_frame_proxy_host.h"
+#include <unordered_map>
#include <utility>
#include <vector>
#include "base/callback.h"
+#include "base/hash.h"
#include "base/lazy_instance.h"
#include "content/browser/bad_message.h"
#include "content/browser/blob_storage/chrome_blob_storage_context.h"
@@ -33,7 +35,9 @@
// The (process id, routing id) pair that identifies one RenderFrameProxy.
typedef std::pair<int32_t, int32_t> RenderFrameProxyHostID;
-typedef base::hash_map<RenderFrameProxyHostID, RenderFrameProxyHost*>
+typedef std::unordered_map<RenderFrameProxyHostID,
+ RenderFrameProxyHost*,
+ base::IntPairHash<RenderFrameProxyHostID>>
RoutingIDFrameProxyMap;
base::LazyInstance<RoutingIDFrameProxyMap>::DestructorAtExit
g_routing_id_frame_proxy_map = LAZY_INSTANCE_INITIALIZER;
diff --git a/content/browser/media/session/media_session_impl.h b/content/browser/media/session/media_session_impl.h
index ce0f41c..561dacd 100644
--- a/content/browser/media/session/media_session_impl.h
+++ b/content/browser/media/session/media_session_impl.h
@@ -9,6 +9,7 @@
#include <map>
#include <set>
+#include <unordered_map>
#include "base/callback_list.h"
#include "base/containers/id_map.h"
@@ -269,7 +270,7 @@
bool operator==(const PlayerIdentifier& player_identifier) const;
bool operator<(const PlayerIdentifier&) const;
- // Hash operator for base::hash_map<>.
+ // Hash operator for std::unordered_map<>.
struct Hash {
size_t operator()(const PlayerIdentifier& player_identifier) const;
};
diff --git a/content/browser/presentation/presentation_service_impl.h b/content/browser/presentation/presentation_service_impl.h
index cd66064f..2b08658 100644
--- a/content/browser/presentation/presentation_service_impl.h
+++ b/content/browser/presentation/presentation_service_impl.h
@@ -8,6 +8,7 @@
#include <map>
#include <memory>
#include <string>
+#include <unordered_map>
#include <vector>
#include "base/callback.h"
@@ -267,7 +268,7 @@
pending_start_presentation_cb_;
// For ReconnectPresentation requests.
- base::hash_map<int, std::unique_ptr<NewPresentationCallbackWrapper>>
+ std::unordered_map<int, std::unique_ptr<NewPresentationCallbackWrapper>>
pending_reconnect_presentation_cbs_;
// RAII binding of |this| to PresentationService request.
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index dd1fd59..aac3f05 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -11,6 +11,7 @@
#include <limits>
#include <map>
#include <set>
+#include <unordered_map>
#include <utility>
#include <vector>
@@ -408,7 +409,7 @@
// site in process-per-site mode. Each map is specific to a BrowserContext.
class SiteProcessMap : public base::SupportsUserData::Data {
public:
- typedef base::hash_map<std::string, RenderProcessHost*> SiteToProcessMap;
+ typedef std::unordered_map<std::string, RenderProcessHost*> SiteToProcessMap;
SiteProcessMap() {}
void RegisterProcess(const std::string& site, RenderProcessHost* process) {
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index fc94c28..7d01cc8a 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -6,6 +6,7 @@
#include <set>
#include <string>
+#include <unordered_map>
#include <utility>
#include <vector>
@@ -13,6 +14,7 @@
#include "base/command_line.h"
#include "base/debug/dump_without_crashing.h"
#include "base/feature_list.h"
+#include "base/hash.h"
#include "base/i18n/rtl.h"
#include "base/json/json_reader.h"
#include "base/metrics/field_trial.h"
@@ -116,7 +118,10 @@
// <process id, routing id>
using RenderViewHostID = std::pair<int32_t, int32_t>;
-using RoutingIDViewMap = base::hash_map<RenderViewHostID, RenderViewHostImpl*>;
+using RoutingIDViewMap =
+ std::unordered_map<RenderViewHostID,
+ RenderViewHostImpl*,
+ base::IntPairHash<RenderViewHostID>>;
base::LazyInstance<RoutingIDViewMap>::Leaky g_routing_id_view_map =
LAZY_INSTANCE_INITIALIZER;
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index f9ffebf..b866ca37 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -9,6 +9,7 @@
#include <algorithm>
#include <set>
#include <tuple>
+#include <unordered_map>
#include <utility>
#include "base/auto_reset.h"
@@ -16,6 +17,7 @@
#include "base/bind_helpers.h"
#include "base/command_line.h"
#include "base/containers/hash_tables.h"
+#include "base/hash.h"
#include "base/i18n/rtl.h"
#include "base/lazy_instance.h"
#include "base/location.h"
@@ -149,7 +151,9 @@
// <process id, routing id>
using RenderWidgetHostID = std::pair<int32_t, int32_t>;
using RoutingIDWidgetMap =
- base::hash_map<RenderWidgetHostID, RenderWidgetHostImpl*>;
+ std::unordered_map<RenderWidgetHostID,
+ RenderWidgetHostImpl*,
+ base::IntPairHash<RenderWidgetHostID>>;
base::LazyInstance<RoutingIDWidgetMap>::DestructorAtExit
g_routing_id_widget_map = LAZY_INSTANCE_INITIALIZER;
diff --git a/content/browser/webui/shared_resources_data_source.cc b/content/browser/webui/shared_resources_data_source.cc
index a4265860..79bbb9a 100644
--- a/content/browser/webui/shared_resources_data_source.cc
+++ b/content/browser/webui/shared_resources_data_source.cc
@@ -44,7 +44,7 @@
int idr;
bool gzipped;
};
-using ResourcesMap = base::hash_map<std::string, IdrGzipped>;
+using ResourcesMap = std::unordered_map<std::string, IdrGzipped>;
const std::map<std::string, std::string> CreatePathPrefixAliasesMap() {
// TODO(rkc): Once we have a separate source for apps, remove '*/apps/'
diff --git a/content/common/content_ipc_logging.cc b/content/common/content_ipc_logging.cc
index 9d2a27d..438ea7b 100644
--- a/content/common/content_ipc_logging.cc
+++ b/content/common/content_ipc_logging.cc
@@ -21,7 +21,7 @@
namespace {
-base::LazyInstance<base::hash_map<uint32_t, LogFunction>>::Leaky
+base::LazyInstance<std::unordered_map<uint32_t, LogFunction>>::Leaky
g_log_function_mapping = LAZY_INSTANCE_INITIALIZER;
} // namespace
diff --git a/content/renderer/accessibility/render_accessibility_impl.cc b/content/renderer/accessibility/render_accessibility_impl.cc
index f9d571c..f3b2d3d 100644
--- a/content/renderer/accessibility/render_accessibility_impl.cc
+++ b/content/renderer/accessibility/render_accessibility_impl.cc
@@ -551,7 +551,7 @@
return;
// Do a breadth-first explore of the whole blink AX tree.
- base::hash_map<int, ui::AXRelativeBounds> new_locations;
+ std::unordered_map<int, ui::AXRelativeBounds> new_locations;
base::queue<WebAXObject> objs_to_explore;
objs_to_explore.push(root);
while (objs_to_explore.size()) {
diff --git a/content/renderer/accessibility/render_accessibility_impl.h b/content/renderer/accessibility/render_accessibility_impl.h
index b1af65d..95ee2f0 100644
--- a/content/renderer/accessibility/render_accessibility_impl.h
+++ b/content/renderer/accessibility/render_accessibility_impl.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_RENDERER_ACCESSIBILITY_RENDER_ACCESSIBILITY_IMPL_H_
#define CONTENT_RENDERER_ACCESSIBILITY_RENDER_ACCESSIBILITY_IMPL_H_
+#include <unordered_map>
#include <vector>
#include "base/containers/hash_tables.h"
@@ -171,7 +172,7 @@
PluginAXTreeSource* plugin_tree_source_;
// Current location of every object, so we can detect when it moves.
- base::hash_map<int, ui::AXRelativeBounds> locations_;
+ std::unordered_map<int, ui::AXRelativeBounds> locations_;
// The most recently observed scroll offset of the root document element.
// TODO(dmazzoni): remove once https://bugs.webkit.org/show_bug.cgi?id=73460
diff --git a/content/renderer/pepper/v8_var_converter.cc b/content/renderer/pepper/v8_var_converter.cc
index d39d0db0..580c2a4 100644
--- a/content/renderer/pepper/v8_var_converter.cc
+++ b/content/renderer/pepper/v8_var_converter.cc
@@ -10,6 +10,7 @@
#include <map>
#include <memory>
#include <string>
+#include <unordered_map>
#include "base/bind.h"
#include "base/containers/circular_deque.h"
@@ -56,23 +57,23 @@
} // namespace
-namespace BASE_HASH_NAMESPACE {
+namespace std {
template <>
struct hash<HashedHandle> {
size_t operator()(const HashedHandle& handle) const { return handle.hash(); }
};
-} // namespace BASE_HASH_NAMESPACE
+} // namespace std
namespace content {
namespace {
// Maps PP_Var IDs to the V8 value handle they correspond to.
-typedef base::hash_map<int64_t, v8::Local<v8::Value> > VarHandleMap;
+typedef std::unordered_map<int64_t, v8::Local<v8::Value>> VarHandleMap;
typedef base::hash_set<int64_t> ParentVarSet;
// Maps V8 value handles to the PP_Var they correspond to.
-typedef base::hash_map<HashedHandle, ScopedPPVar> HandleVarMap;
+typedef std::unordered_map<HashedHandle, ScopedPPVar> HandleVarMap;
typedef base::hash_set<HashedHandle> ParentHandleSet;
// Returns a V8 value which corresponds to a given PP_Var. If |var| is a
diff --git a/content/renderer/pepper/v8_var_converter_unittest.cc b/content/renderer/pepper/v8_var_converter_unittest.cc
index 4787d1d..69eed42 100644
--- a/content/renderer/pepper/v8_var_converter_unittest.cc
+++ b/content/renderer/pepper/v8_var_converter_unittest.cc
@@ -9,6 +9,7 @@
#include <cmath>
#include <memory>
+#include <unordered_map>
#include "base/logging.h"
#include "base/memory/ref_counted.h"
@@ -74,7 +75,7 @@
};
// Maps PP_Var IDs to the V8 value handle they correspond to.
-typedef base::hash_map<int64_t, v8::Local<v8::Value> > VarHandleMap;
+typedef std::unordered_map<int64_t, v8::Local<v8::Value>> VarHandleMap;
bool Equals(const PP_Var& var,
v8::Local<v8::Value> val,
diff --git a/content/renderer/pepper/video_decoder_shim.h b/content/renderer/pepper/video_decoder_shim.h
index 40b69d5..e5f640d 100644
--- a/content/renderer/pepper/video_decoder_shim.h
+++ b/content/renderer/pepper/video_decoder_shim.h
@@ -8,6 +8,7 @@
#include <stdint.h>
#include <memory>
+#include <unordered_map>
#include <vector>
#include "base/containers/hash_tables.h"
@@ -84,7 +85,7 @@
// The current decoded frame size.
gfx::Size texture_size_;
// Map that takes the plugin's GL texture id to the renderer's GL texture id.
- using TextureIdMap = base::hash_map<uint32_t, uint32_t>;
+ using TextureIdMap = std::unordered_map<uint32_t, uint32_t>;
TextureIdMap texture_id_map_;
// Available textures (these are plugin ids.)
using TextureIdSet = base::hash_set<uint32_t>;
diff --git a/content/shell/browser/web_test/web_test_permission_manager.h b/content/shell/browser/web_test/web_test_permission_manager.h
index c777605..279bb2e 100644
--- a/content/shell/browser/web_test/web_test_permission_manager.h
+++ b/content/shell/browser/web_test/web_test_permission_manager.h
@@ -85,9 +85,9 @@
struct Subscription;
using SubscriptionsMap = base::IDMap<std::unique_ptr<Subscription>>;
- using PermissionsMap = base::hash_map<PermissionDescription,
- blink::mojom::PermissionStatus,
- PermissionDescription::Hash>;
+ using PermissionsMap = std::unordered_map<PermissionDescription,
+ blink::mojom::PermissionStatus,
+ PermissionDescription::Hash>;
void OnPermissionChanged(const PermissionDescription& permission,
blink::mojom::PermissionStatus status);
diff --git a/extensions/browser/api/declarative/deduping_factory.h b/extensions/browser/api/declarative/deduping_factory.h
index 53c75c4..b3d9658 100644
--- a/extensions/browser/api/declarative/deduping_factory.h
+++ b/extensions/browser/api/declarative/deduping_factory.h
@@ -9,6 +9,7 @@
#include <list>
#include <string>
+#include <unordered_map>
#include "base/compiler_specific.h"
#include "base/containers/hash_tables.h"
@@ -82,8 +83,8 @@
// Cache of previous prototypes in most-recently-used order. Most recently
// used objects are at the end.
typedef std::list<scoped_refptr<const BaseClassT> > PrototypeList;
- typedef base::hash_map<InstanceType, PrototypeList> ExistingPrototypes;
- typedef base::hash_map<InstanceType, FactoryMethod> FactoryMethods;
+ typedef std::unordered_map<InstanceType, PrototypeList> ExistingPrototypes;
+ typedef std::unordered_map<InstanceType, FactoryMethod> FactoryMethods;
typedef base::hash_set<InstanceType> ParameterizedTypes;
const size_t max_number_prototypes_;
diff --git a/gpu/command_buffer/client/buffer_tracker.h b/gpu/command_buffer/client/buffer_tracker.h
index 62508b3..58b4b03 100644
--- a/gpu/command_buffer/client/buffer_tracker.h
+++ b/gpu/command_buffer/client/buffer_tracker.h
@@ -105,7 +105,7 @@
void Free(Buffer* buffer);
private:
- typedef base::hash_map<GLuint, Buffer*> BufferMap;
+ typedef std::unordered_map<GLuint, Buffer*> BufferMap;
MappedMemoryManager* mapped_memory_;
BufferMap buffers_;
diff --git a/gpu/command_buffer/client/gles2_implementation.h b/gpu/command_buffer/client/gles2_implementation.h
index 4f298554..0858127 100644
--- a/gpu/command_buffer/client/gles2_implementation.h
+++ b/gpu/command_buffer/client/gles2_implementation.h
@@ -13,6 +13,7 @@
#include <memory>
#include <set>
#include <string>
+#include <unordered_map>
#include <utility>
#include <vector>
@@ -777,7 +778,7 @@
MappedBufferMap mapped_buffers_;
// TODO(zmo): Consolidate |mapped_buffers_| and |mapped_buffer_range_map_|.
- typedef base::hash_map<GLuint, MappedBuffer> MappedBufferRangeMap;
+ typedef std::unordered_map<GLuint, MappedBuffer> MappedBufferRangeMap;
MappedBufferRangeMap mapped_buffer_range_map_;
typedef std::map<const void*, MappedTexture> MappedTextureMap;
diff --git a/gpu/command_buffer/client/program_info_manager.cc b/gpu/command_buffer/client/program_info_manager.cc
index 5c79059..222e5b4a 100644
--- a/gpu/command_buffer/client/program_info_manager.cc
+++ b/gpu/command_buffer/client/program_info_manager.cc
@@ -184,7 +184,7 @@
GLint ProgramInfoManager::Program::GetFragDataLocation(
const std::string& name) const {
- base::hash_map<std::string, GLint>::const_iterator iter =
+ std::unordered_map<std::string, GLint>::const_iterator iter =
frag_data_locations_.find(name);
if (iter == frag_data_locations_.end())
return -1;
diff --git a/gpu/command_buffer/client/program_info_manager.h b/gpu/command_buffer/client/program_info_manager.h
index fc6c9677..2354bb6f 100644
--- a/gpu/command_buffer/client/program_info_manager.h
+++ b/gpu/command_buffer/client/program_info_manager.h
@@ -9,6 +9,7 @@
#include <stdint.h>
#include <string>
+#include <unordered_map>
#include <vector>
#include "base/containers/hash_tables.h"
@@ -242,14 +243,14 @@
std::vector<UniformES3> uniforms_es3_;
- base::hash_map<std::string, GLint> frag_data_locations_;
- base::hash_map<std::string, GLint> frag_data_indices_;
+ std::unordered_map<std::string, GLint> frag_data_locations_;
+ std::unordered_map<std::string, GLint> frag_data_indices_;
};
Program* GetProgramInfo(
GLES2Implementation* gl, GLuint program, ProgramInfoType type);
- typedef base::hash_map<GLuint, Program> ProgramInfoMap;
+ typedef std::unordered_map<GLuint, Program> ProgramInfoMap;
ProgramInfoMap program_infos_;
diff --git a/gpu/command_buffer/client/query_tracker.h b/gpu/command_buffer/client/query_tracker.h
index 1596e98..4feed88 100644
--- a/gpu/command_buffer/client/query_tracker.h
+++ b/gpu/command_buffer/client/query_tracker.h
@@ -13,6 +13,7 @@
#include <bitset>
#include <list>
#include <memory>
+#include <unordered_map>
#include "base/atomicops.h"
#include "base/containers/circular_deque.h"
@@ -225,7 +226,7 @@
}
private:
- typedef base::hash_map<GLuint, std::unique_ptr<Query>> QueryIdMap;
+ typedef std::unordered_map<GLuint, std::unique_ptr<Query>> QueryIdMap;
typedef base::flat_map<GLenum, Query*> QueryTargetMap;
QueryIdMap queries_;
diff --git a/gpu/command_buffer/client/vertex_array_object_manager.h b/gpu/command_buffer/client/vertex_array_object_manager.h
index 9efac4c..77c69c4c 100644
--- a/gpu/command_buffer/client/vertex_array_object_manager.h
+++ b/gpu/command_buffer/client/vertex_array_object_manager.h
@@ -9,6 +9,7 @@
#include <stdint.h>
#include <memory>
+#include <unordered_map>
#include "base/containers/hash_tables.h"
#include "base/macros.h"
@@ -101,7 +102,7 @@
GLuint bound_element_array_buffer() const;
private:
- typedef base::hash_map<GLuint, VertexArrayObject*> VertexArrayObjectMap;
+ typedef std::unordered_map<GLuint, VertexArrayObject*> VertexArrayObjectMap;
bool IsDefaultVAOBound() const;
diff --git a/gpu/command_buffer/service/buffer_manager.h b/gpu/command_buffer/service/buffer_manager.h
index b9210a3a..cda173d 100644
--- a/gpu/command_buffer/service/buffer_manager.h
+++ b/gpu/command_buffer/service/buffer_manager.h
@@ -11,6 +11,7 @@
#include <map>
#include <memory>
+#include <unordered_map>
#include <vector>
#include "base/containers/hash_tables.h"
@@ -447,7 +448,7 @@
scoped_refptr<FeatureInfo> feature_info_;
// Info for each buffer in the system.
- typedef base::hash_map<GLuint, scoped_refptr<Buffer> > BufferMap;
+ typedef std::unordered_map<GLuint, scoped_refptr<Buffer>> BufferMap;
BufferMap buffers_;
// The maximum size of buffers.
diff --git a/gpu/command_buffer/service/context_group.h b/gpu/command_buffer/service/context_group.h
index 026bca1..f7736ce 100644
--- a/gpu/command_buffer/service/context_group.h
+++ b/gpu/command_buffer/service/context_group.h
@@ -8,6 +8,7 @@
#include <stdint.h>
#include <memory>
+#include <unordered_map>
#include <vector>
#include "base/containers/hash_tables.h"
@@ -228,7 +229,7 @@
}
bool GetSyncServiceId(GLuint client_id, GLsync* service_id) const {
- base::hash_map<GLuint, GLsync>::const_iterator iter =
+ std::unordered_map<GLuint, GLsync>::const_iterator iter =
syncs_id_map_.find(client_id);
if (iter == syncs_id_map_.end())
return false;
@@ -324,7 +325,7 @@
std::vector<base::WeakPtr<DecoderContext>> decoders_;
// Mappings from client side IDs to service side IDs.
- base::hash_map<GLuint, GLsync> syncs_id_map_;
+ std::unordered_map<GLuint, GLsync> syncs_id_map_;
bool use_passthrough_cmd_decoder_;
std::unique_ptr<PassthroughResources> passthrough_resources_;
diff --git a/gpu/command_buffer/service/framebuffer_manager.h b/gpu/command_buffer/service/framebuffer_manager.h
index 44fa609..f09d3db4 100644
--- a/gpu/command_buffer/service/framebuffer_manager.h
+++ b/gpu/command_buffer/service/framebuffer_manager.h
@@ -9,6 +9,7 @@
#include <stdint.h>
#include <memory>
+#include <unordered_map>
#include <vector>
#include "base/containers/hash_tables.h"
@@ -279,7 +280,7 @@
unsigned framebuffer_complete_state_count_id_;
// A map of attachments.
- typedef base::hash_map<GLenum, scoped_refptr<Attachment> > AttachmentMap;
+ typedef std::unordered_map<GLenum, scoped_refptr<Attachment>> AttachmentMap;
AttachmentMap attachments_;
// User's draw buffers setting through DrawBuffers() call.
@@ -370,8 +371,7 @@
}
// Info for each framebuffer in the system.
- typedef base::hash_map<GLuint, scoped_refptr<Framebuffer> >
- FramebufferMap;
+ typedef std::unordered_map<GLuint, scoped_refptr<Framebuffer>> FramebufferMap;
FramebufferMap framebuffers_;
// Incremented anytime anything changes that might effect framebuffer
diff --git a/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc b/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc
index f5fbb9d..f315142d7 100644
--- a/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc
+++ b/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc
@@ -7,6 +7,7 @@
#include <stddef.h>
#include <algorithm>
+#include <unordered_map>
#include "gpu/command_buffer/service/decoder_context.h"
#include "gpu/command_buffer/service/gl_utils.h"
@@ -1006,7 +1007,7 @@
ShaderVector vertex_shaders_;
ShaderVector fragment_shaders_;
typedef int ProgramMapKey;
- typedef base::hash_map<ProgramMapKey, ProgramInfo> ProgramMap;
+ typedef std::unordered_map<ProgramMapKey, ProgramInfo> ProgramMap;
ProgramMap programs_;
GLuint vertex_array_object_id_;
GLuint buffer_id_;
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 5457525..d58db93 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -16,6 +16,7 @@
#include <map>
#include <memory>
#include <set>
+#include <unordered_map>
#include <utility>
#include "base/callback.h"
@@ -2707,7 +2708,7 @@
std::vector<std::unique_ptr<gl::GLFence>> deschedule_until_finished_fences_;
// Used to validate multisample renderbuffers if needed
- typedef base::hash_map<GLenum, GLuint> TextureMap;
+ typedef std::unordered_map<GLenum, GLuint> TextureMap;
TextureMap validation_textures_;
GLuint validation_fbo_multisample_;
GLuint validation_fbo_;
diff --git a/gpu/command_buffer/service/id_manager.h b/gpu/command_buffer/service/id_manager.h
index b855282..2de746b 100644
--- a/gpu/command_buffer/service/id_manager.h
+++ b/gpu/command_buffer/service/id_manager.h
@@ -38,7 +38,7 @@
bool GetClientId(GLuint service_id, GLuint* client_id);
private:
- typedef base::hash_map<GLuint, GLuint> MapType;
+ typedef std::unordered_map<GLuint, GLuint> MapType;
MapType id_map_;
DISALLOW_COPY_AND_ASSIGN(IdManager);
diff --git a/gpu/command_buffer/service/image_manager.h b/gpu/command_buffer/service/image_manager.h
index 30ac82f..ee1ca3c 100644
--- a/gpu/command_buffer/service/image_manager.h
+++ b/gpu/command_buffer/service/image_manager.h
@@ -30,7 +30,7 @@
gl::GLImage* LookupImage(int32_t service_id);
private:
- typedef base::hash_map<int32_t, scoped_refptr<gl::GLImage>> GLImageMap;
+ typedef std::unordered_map<int32_t, scoped_refptr<gl::GLImage>> GLImageMap;
GLImageMap images_;
DISALLOW_COPY_AND_ASSIGN(ImageManager);
diff --git a/gpu/command_buffer/service/program_cache.h b/gpu/command_buffer/service/program_cache.h
index 4232ad52..5f3f8be 100644
--- a/gpu/command_buffer/service/program_cache.h
+++ b/gpu/command_buffer/service/program_cache.h
@@ -9,6 +9,7 @@
#include <map>
#include <string>
+#include <unordered_map>
#include "base/containers/hash_tables.h"
#include "base/macros.h"
@@ -125,8 +126,7 @@
CacheProgramCallback cache_program_callback_;
private:
- typedef base::hash_map<std::string,
- LinkedProgramStatus> LinkStatusMap;
+ typedef std::unordered_map<std::string, LinkedProgramStatus> LinkStatusMap;
// called to clear the backend cache
virtual void ClearBackend() = 0;
diff --git a/gpu/command_buffer/service/query_manager.h b/gpu/command_buffer/service/query_manager.h
index 1b6b8c57..300101f 100644
--- a/gpu/command_buffer/service/query_manager.h
+++ b/gpu/command_buffer/service/query_manager.h
@@ -8,6 +8,7 @@
#include <stdint.h>
#include <memory>
+#include <unordered_map>
#include <vector>
#include "base/atomicops.h"
@@ -245,7 +246,7 @@
unsigned query_count_;
// Info for each query in the system.
- using QueryMap = base::hash_map<GLuint, scoped_refptr<Query>>;
+ using QueryMap = std::unordered_map<GLuint, scoped_refptr<Query>>;
QueryMap queries_;
using GeneratedQueryIds = base::hash_set<GLuint>;
diff --git a/gpu/command_buffer/service/renderbuffer_manager.h b/gpu/command_buffer/service/renderbuffer_manager.h
index a647c5b5..e0d60b17 100644
--- a/gpu/command_buffer/service/renderbuffer_manager.h
+++ b/gpu/command_buffer/service/renderbuffer_manager.h
@@ -10,6 +10,7 @@
#include <memory>
#include <string>
+#include <unordered_map>
#include "base/containers/flat_set.h"
#include "base/containers/hash_tables.h"
@@ -224,7 +225,8 @@
bool have_context_;
// Info for each renderbuffer in the system.
- typedef base::hash_map<GLuint, scoped_refptr<Renderbuffer> > RenderbufferMap;
+ typedef std::unordered_map<GLuint, scoped_refptr<Renderbuffer>>
+ RenderbufferMap;
RenderbufferMap renderbuffers_;
DISALLOW_COPY_AND_ASSIGN(RenderbufferManager);
diff --git a/gpu/command_buffer/service/sampler_manager.h b/gpu/command_buffer/service/sampler_manager.h
index 05d2958..cff767b 100644
--- a/gpu/command_buffer/service/sampler_manager.h
+++ b/gpu/command_buffer/service/sampler_manager.h
@@ -5,6 +5,7 @@
#ifndef GPU_COMMAND_BUFFER_SERVICE_SAMPLER_MANAGER_H_
#define GPU_COMMAND_BUFFER_SERVICE_SAMPLER_MANAGER_H_
+#include <unordered_map>
#include <vector>
#include "base/containers/hash_tables.h"
@@ -160,7 +161,7 @@
scoped_refptr<FeatureInfo> feature_info_;
// Info for each sampler in the system.
- typedef base::hash_map<GLuint, scoped_refptr<Sampler> > SamplerMap;
+ typedef std::unordered_map<GLuint, scoped_refptr<Sampler>> SamplerMap;
SamplerMap samplers_;
bool have_context_;
diff --git a/gpu/command_buffer/service/shader_manager.h b/gpu/command_buffer/service/shader_manager.h
index 579dddd..7d101e6 100644
--- a/gpu/command_buffer/service/shader_manager.h
+++ b/gpu/command_buffer/service/shader_manager.h
@@ -6,6 +6,7 @@
#define GPU_COMMAND_BUFFER_SERVICE_SHADER_MANAGER_H_
#include <string>
+#include <unordered_map>
#include "base/containers/hash_tables.h"
#include "base/logging.h"
@@ -316,7 +317,7 @@
friend class Shader;
// Info for each shader by service side shader Id.
- typedef base::hash_map<GLuint, scoped_refptr<Shader> > ShaderMap;
+ typedef std::unordered_map<GLuint, scoped_refptr<Shader>> ShaderMap;
ShaderMap shaders_;
void RemoveShaderIfUnused(Shader* shader);
diff --git a/gpu/command_buffer/service/shader_translator.h b/gpu/command_buffer/service/shader_translator.h
index 98ccdb37..c17a5e4 100644
--- a/gpu/command_buffer/service/shader_translator.h
+++ b/gpu/command_buffer/service/shader_translator.h
@@ -6,6 +6,7 @@
#define GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_H_
#include <string>
+#include <unordered_map>
#include "base/containers/hash_tables.h"
#include "base/macros.h"
@@ -22,11 +23,11 @@
namespace gles2 {
// Mapping between variable name and info.
-typedef base::hash_map<std::string, sh::Attribute> AttributeMap;
+typedef std::unordered_map<std::string, sh::Attribute> AttributeMap;
typedef std::vector<sh::OutputVariable> OutputVariableList;
-typedef base::hash_map<std::string, sh::Uniform> UniformMap;
-typedef base::hash_map<std::string, sh::Varying> VaryingMap;
-typedef base::hash_map<std::string, sh::InterfaceBlock> InterfaceBlockMap;
+typedef std::unordered_map<std::string, sh::Uniform> UniformMap;
+typedef std::unordered_map<std::string, sh::Varying> VaryingMap;
+typedef std::unordered_map<std::string, sh::InterfaceBlock> InterfaceBlockMap;
typedef base::RefCountedData<std::string> OptionsAffectingCompilationString;
// Translates a GLSL ES 2.0 shader to desktop GLSL shader, or just
diff --git a/gpu/command_buffer/service/texture_manager.h b/gpu/command_buffer/service/texture_manager.h
index c5fddd5..9ebcbf5 100644
--- a/gpu/command_buffer/service/texture_manager.h
+++ b/gpu/command_buffer/service/texture_manager.h
@@ -13,6 +13,7 @@
#include <memory>
#include <set>
#include <string>
+#include <unordered_map>
#include <vector>
#include "base/containers/hash_tables.h"
@@ -1251,7 +1252,7 @@
std::vector<FramebufferManager*> framebuffer_managers_;
// Info for each texture in the system.
- typedef base::hash_map<GLuint, scoped_refptr<TextureRef> > TextureMap;
+ typedef std::unordered_map<GLuint, scoped_refptr<TextureRef>> TextureMap;
TextureMap textures_;
GLsizei max_texture_size_;
diff --git a/gpu/command_buffer/service/transform_feedback_manager.h b/gpu/command_buffer/service/transform_feedback_manager.h
index e731368..98ff493 100644
--- a/gpu/command_buffer/service/transform_feedback_manager.h
+++ b/gpu/command_buffer/service/transform_feedback_manager.h
@@ -5,6 +5,7 @@
#ifndef GPU_COMMAND_BUFFER_SERVICE_TRANSFORM_FEEDBACK_MANAGER_H_
#define GPU_COMMAND_BUFFER_SERVICE_TRANSFORM_FEEDBACK_MANAGER_H_
+#include <unordered_map>
#include <vector>
#include "base/containers/hash_tables.h"
@@ -138,8 +139,8 @@
private:
// Info for each transform feedback in the system.
- base::hash_map<GLuint,
- scoped_refptr<TransformFeedback> > transform_feedbacks_;
+ std::unordered_map<GLuint, scoped_refptr<TransformFeedback>>
+ transform_feedbacks_;
GLuint max_transform_feedback_separate_attribs_;
diff --git a/gpu/command_buffer/service/vertex_array_manager.h b/gpu/command_buffer/service/vertex_array_manager.h
index 29cc3d6..406d7b2 100644
--- a/gpu/command_buffer/service/vertex_array_manager.h
+++ b/gpu/command_buffer/service/vertex_array_manager.h
@@ -56,7 +56,7 @@
void StopTracking(VertexAttribManager* vertex_attrib_manager);
// Info for each vertex array in the system.
- typedef base::hash_map<GLuint, scoped_refptr<VertexAttribManager> >
+ typedef std::unordered_map<GLuint, scoped_refptr<VertexAttribManager>>
VertexAttribManagerMap;
VertexAttribManagerMap client_vertex_attrib_managers_;
diff --git a/gpu/config/gpu_control_list.h b/gpu/config/gpu_control_list.h
index d9dc206..0044bda 100644
--- a/gpu/config/gpu_control_list.h
+++ b/gpu/config/gpu_control_list.h
@@ -9,6 +9,7 @@
#include <set>
#include <string>
+#include <unordered_map>
#include <vector>
#include "base/containers/hash_tables.h"
@@ -22,7 +23,7 @@
class GPU_EXPORT GpuControlList {
public:
- typedef base::hash_map<int, std::string> FeatureMap;
+ typedef std::unordered_map<int, std::string> FeatureMap;
enum OsType {
kOsLinux,
diff --git a/gpu/ipc/client/command_buffer_proxy_impl.h b/gpu/ipc/client/command_buffer_proxy_impl.h
index f4406ba..64f5a69a 100644
--- a/gpu/ipc/client/command_buffer_proxy_impl.h
+++ b/gpu/ipc/client/command_buffer_proxy_impl.h
@@ -12,6 +12,7 @@
#include <memory>
#include <queue>
#include <string>
+#include <unordered_map>
#include "base/callback.h"
#include "base/compiler_specific.h"
@@ -156,7 +157,7 @@
private:
typedef std::map<int32_t, scoped_refptr<gpu::Buffer>> TransferBufferMap;
- typedef base::hash_map<uint32_t, base::OnceClosure> SignalTaskMap;
+ typedef std::unordered_map<uint32_t, base::OnceClosure> SignalTaskMap;
void CheckLock() {
if (lock_) {
diff --git a/gpu/ipc/client/gpu_channel_host.h b/gpu/ipc/client/gpu_channel_host.h
index 8334a0b..cc0c56ca 100644
--- a/gpu/ipc/client/gpu_channel_host.h
+++ b/gpu/ipc/client/gpu_channel_host.h
@@ -10,6 +10,7 @@
#include <memory>
#include <string>
+#include <unordered_map>
#include <vector>
#include "base/atomic_sequence_num.h"
@@ -205,7 +206,7 @@
// Threading notes: most fields are only accessed on the IO thread, except
// for lost_ which is protected by |lock_|.
- base::hash_map<int32_t, RouteInfo> routes_;
+ std::unordered_map<int32_t, RouteInfo> routes_;
std::unique_ptr<IPC::ChannelMojo> channel_;
base::flat_map<int, IPC::PendingSyncMsg*> pending_syncs_;
diff --git a/gpu/ipc/service/gpu_memory_buffer_factory_io_surface.h b/gpu/ipc/service/gpu_memory_buffer_factory_io_surface.h
index 1ec67a3..aafcc0d1 100644
--- a/gpu/ipc/service/gpu_memory_buffer_factory_io_surface.h
+++ b/gpu/ipc/service/gpu_memory_buffer_factory_io_surface.h
@@ -5,6 +5,7 @@
#ifndef GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_
#define GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_
+#include <unordered_map>
#include <utility>
#include <IOSurface/IOSurface.h>
@@ -63,7 +64,8 @@
private:
typedef std::pair<gfx::IOSurfaceId, int> IOSurfaceMapKey;
- typedef base::hash_map<IOSurfaceMapKey, base::ScopedCFTypeRef<IOSurfaceRef>>
+ typedef std::unordered_map<IOSurfaceMapKey,
+ base::ScopedCFTypeRef<IOSurfaceRef>>
IOSurfaceMap;
// TODO(reveman): Remove |io_surfaces_| and allow IOSurface backed GMBs to be
// used with any GPU process by passing a mach_port to CreateImageCHROMIUM.
diff --git a/ios/net/cookies/cookie_creation_time_manager.h b/ios/net/cookies/cookie_creation_time_manager.h
index 120ba7a..5d1c904 100644
--- a/ios/net/cookies/cookie_creation_time_manager.h
+++ b/ios/net/cookies/cookie_creation_time_manager.h
@@ -6,6 +6,7 @@
#define IOS_NET_COOKIES_COOKIE_CREATION_TIME_MANAGER_H_
#include <set>
+#include <unordered_map>
#include "base/containers/hash_tables.h"
#include "base/memory/weak_ptr.h"
@@ -44,7 +45,7 @@
base::WeakPtr<CookieCreationTimeManager> GetWeakPtr();
private:
- base::hash_map<std::string, base::Time> creation_times_;
+ std::unordered_map<std::string, base::Time> creation_times_;
std::set<base::Time> unique_times_;
base::ThreadChecker thread_checker_;
base::WeakPtrFactory<CookieCreationTimeManager> weak_factory_;
diff --git a/ios/net/cookies/cookie_creation_time_manager.mm b/ios/net/cookies/cookie_creation_time_manager.mm
index 831a5a6..dfe1ec9 100644
--- a/ios/net/cookies/cookie_creation_time_manager.mm
+++ b/ios/net/cookies/cookie_creation_time_manager.mm
@@ -101,7 +101,7 @@
base::Time CookieCreationTimeManager::GetCreationTime(NSHTTPCookie* cookie) {
DCHECK(thread_checker_.CalledOnValidThread());
- base::hash_map<std::string, base::Time>::iterator it =
+ std::unordered_map<std::string, base::Time>::iterator it =
creation_times_.find(GetCookieUniqueID(cookie));
if (it != creation_times_.end())
return it->second;
diff --git a/ios/web/net/request_tracker_impl.mm b/ios/web/net/request_tracker_impl.mm
index 1ca660a..92e71ac6 100644
--- a/ios/web/net/request_tracker_impl.mm
+++ b/ios/web/net/request_tracker_impl.mm
@@ -37,7 +37,7 @@
// always access it from the main thread, the provider is accessing it from the
// WebThread, a thread created by the UIWebView/CFURL. For this reason access to
// this variable must always gated by |g_trackers_lock|.
-typedef base::hash_map<std::string, web::RequestTrackerImpl*> TrackerMap;
+typedef std::unordered_map<std::string, web::RequestTrackerImpl*> TrackerMap;
TrackerMap* g_trackers = NULL;
base::Lock* g_trackers_lock = NULL;
diff --git a/ipc/ipc_logging.h b/ipc/ipc_logging.h
index eee32f6..3b3b4ca 100644
--- a/ipc/ipc_logging.h
+++ b/ipc/ipc_logging.h
@@ -10,6 +10,7 @@
#if BUILDFLAG(IPC_MESSAGE_LOG_ENABLED)
#include <stdint.h>
+#include <unordered_map>
#include <vector>
#include "base/component_export.h"
@@ -25,7 +26,7 @@
const IPC::Message* msg,
std::string* params);
-typedef base::hash_map<uint32_t, LogFunction > LogFunctionMap;
+typedef std::unordered_map<uint32_t, LogFunction> LogFunctionMap;
namespace IPC {
diff --git a/media/blink/cdm_session_adapter.h b/media/blink/cdm_session_adapter.h
index 0cb6cf5..6710962 100644
--- a/media/blink/cdm_session_adapter.h
+++ b/media/blink/cdm_session_adapter.h
@@ -10,6 +10,7 @@
#include <map>
#include <memory>
#include <string>
+#include <unordered_map>
#include <vector>
#include "base/containers/hash_tables.h"
@@ -112,8 +113,9 @@
friend class base::RefCounted<CdmSessionAdapter>;
// Session ID to WebContentDecryptionModuleSessionImpl mapping.
- typedef base::hash_map<std::string,
- base::WeakPtr<WebContentDecryptionModuleSessionImpl> >
+ typedef std::unordered_map<
+ std::string,
+ base::WeakPtr<WebContentDecryptionModuleSessionImpl>>
SessionMap;
~CdmSessionAdapter();
diff --git a/media/blink/lru.h b/media/blink/lru.h
index 7ad9637..5aab6d3 100644
--- a/media/blink/lru.h
+++ b/media/blink/lru.h
@@ -8,6 +8,7 @@
#include <stddef.h>
#include <list>
+#include <unordered_map>
#include "base/containers/hash_tables.h"
#include "base/macros.h"
@@ -85,7 +86,7 @@
// Maps element values to positions in the list so that we
// can quickly remove elements.
- base::hash_map<T, typename std::list<T>::iterator> pos_;
+ std::unordered_map<T, typename std::list<T>::iterator> pos_;
DISALLOW_COPY_AND_ASSIGN(LRU);
};
diff --git a/media/blink/multibuffer.h b/media/blink/multibuffer.h
index be1ea23..6457be4 100644
--- a/media/blink/multibuffer.h
+++ b/media/blink/multibuffer.h
@@ -12,6 +12,7 @@
#include <map>
#include <memory>
#include <set>
+#include <unordered_map>
#include <vector>
#include "base/callback.h"
@@ -41,7 +42,7 @@
} // namespace media
-namespace BASE_HASH_NAMESPACE {
+namespace std {
template <>
struct hash<media::MultiBufferGlobalBlockId> {
@@ -50,7 +51,7 @@
}
};
-} // namespace BASE_HASH_NAMESPACE
+} // namespace std
namespace media {
@@ -210,7 +211,7 @@
// Block numbers can be calculated from byte positions as:
// block_num = byte_pos >> block_size_shift
typedef MultiBufferBlockId BlockId;
- typedef base::hash_map<BlockId, scoped_refptr<DataBuffer>> DataMap;
+ typedef std::unordered_map<BlockId, scoped_refptr<DataBuffer>> DataMap;
// Registers a reader at the given position.
// If the cache does not already contain |pos|, it will activate
diff --git a/media/midi/midi_manager_alsa.h b/media/midi/midi_manager_alsa.h
index 92fb8309..75cba5cc 100644
--- a/media/midi/midi_manager_alsa.h
+++ b/media/midi/midi_manager_alsa.h
@@ -10,6 +10,7 @@
#include <map>
#include <memory>
+#include <unordered_map>
#include <utility>
#include <vector>
@@ -362,8 +363,8 @@
};
};
- using SourceMap = base::hash_map<int, uint32_t>;
- using OutPortMap = base::hash_map<uint32_t, int>;
+ using SourceMap = std::unordered_map<int, uint32_t>;
+ using OutPortMap = std::unordered_map<uint32_t, int>;
using ScopedSndSeqPtr = std::unique_ptr<snd_seq_t, SndSeqDeleter>;
using ScopedSndMidiEventPtr =
std::unique_ptr<snd_midi_event_t, SndMidiEventDeleter>;
diff --git a/media/midi/midi_manager_android.h b/media/midi/midi_manager_android.h
index f63fde6f..86da387 100644
--- a/media/midi/midi_manager_android.h
+++ b/media/midi/midi_manager_android.h
@@ -10,6 +10,7 @@
#include <stdint.h>
#include <memory>
+#include <unordered_map>
#include <vector>
#include "base/android/scoped_java_ref.h"
@@ -79,11 +80,11 @@
std::vector<MidiInputPortAndroid*> all_input_ports_;
// A dictionary from a port to its index.
// input_port_to_index_[all_input_ports_[i]] == i for each valid |i|.
- base::hash_map<MidiInputPortAndroid*, size_t> input_port_to_index_;
+ std::unordered_map<MidiInputPortAndroid*, size_t> input_port_to_index_;
// Ditto for output ports.
std::vector<MidiOutputPortAndroid*> all_output_ports_;
- base::hash_map<MidiOutputPortAndroid*, size_t> output_port_to_index_;
+ std::unordered_map<MidiOutputPortAndroid*, size_t> output_port_to_index_;
base::android::ScopedJavaGlobalRef<jobject> raw_manager_;
};
diff --git a/media/midi/midi_manager_usb.h b/media/midi/midi_manager_usb.h
index 90aa2d54..b47204a 100644
--- a/media/midi/midi_manager_usb.h
+++ b/media/midi/midi_manager_usb.h
@@ -9,11 +9,13 @@
#include <stdint.h>
#include <memory>
+#include <unordered_map>
#include <utility>
#include <vector>
#include "base/compiler_specific.h"
#include "base/containers/hash_tables.h"
+#include "base/hash.h"
#include "base/macros.h"
#include "base/synchronization/lock.h"
#include "base/time/time.h"
@@ -87,7 +89,10 @@
std::unique_ptr<UsbMidiInputStream> input_stream_;
// A map from <endpoint_number, cable_number> to the index of input jacks.
- base::hash_map<std::pair<int, int>, size_t> input_jack_dictionary_;
+ std::unordered_map<std::pair<int, int>,
+ size_t,
+ base::IntPairHash<std::pair<int, int>>>
+ input_jack_dictionary_;
DISALLOW_COPY_AND_ASSIGN(MidiManagerUsb);
};
diff --git a/mojo/core/handle_table.h b/mojo/core/handle_table.h
index 234bdac..7e7f82f 100644
--- a/mojo/core/handle_table.h
+++ b/mojo/core/handle_table.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <unordered_map>
#include <vector>
#include "base/containers/hash_tables.h"
@@ -74,7 +75,7 @@
bool busy = false;
};
- using HandleMap = base::hash_map<MojoHandle, Entry>;
+ using HandleMap = std::unordered_map<MojoHandle, Entry>;
HandleMap handles_;
base::Lock lock_;
diff --git a/mojo/core/multiprocess_message_pipe_unittest.cc b/mojo/core/multiprocess_message_pipe_unittest.cc
index c6f1141..4b5d4344 100644
--- a/mojo/core/multiprocess_message_pipe_unittest.cc
+++ b/mojo/core/multiprocess_message_pipe_unittest.cc
@@ -8,6 +8,7 @@
#include <string.h>
#include <string>
+#include <unordered_map>
#include <utility>
#include <vector>
@@ -937,7 +938,7 @@
DEFINE_TEST_CLIENT_WITH_PIPE(CommandDrivenClient,
MultiprocessMessagePipeTest,
h) {
- base::hash_map<std::string, MojoHandle> named_pipes;
+ std::unordered_map<std::string, MojoHandle> named_pipes;
for (;;) {
MojoHandle p;
auto parts = base::SplitString(ReadMessageWithOptionalHandle(h, &p), ":",
diff --git a/net/nqe/throughput_analyzer.h b/net/nqe/throughput_analyzer.h
index c02a639..73682a2 100644
--- a/net/nqe/throughput_analyzer.h
+++ b/net/nqe/throughput_analyzer.h
@@ -124,7 +124,7 @@
// Mapping from URL request to the last time data was received for that
// request.
- typedef base::hash_map<const URLRequest*, base::TimeTicks> Requests;
+ typedef std::unordered_map<const URLRequest*, base::TimeTicks> Requests;
// Set of URL requests to hold the requests that reduce the accuracy of
// throughput computation. These requests are not used in throughput
diff --git a/ppapi/proxy/host_dispatcher.h b/ppapi/proxy/host_dispatcher.h
index 036b2386..47d1f34 100644
--- a/ppapi/proxy/host_dispatcher.h
+++ b/ppapi/proxy/host_dispatcher.h
@@ -7,6 +7,7 @@
#include <map>
#include <string>
+#include <unordered_map>
#include <vector>
#include "base/compiler_specific.h"
@@ -130,7 +131,7 @@
// Maps interface name to whether that interface is supported. If an interface
// name is not in the map, that implies that we haven't queried for it yet.
- typedef base::hash_map<std::string, bool> PluginSupportedMap;
+ typedef std::unordered_map<std::string, bool> PluginSupportedMap;
PluginSupportedMap plugin_supported_;
// Guaranteed non-NULL.
diff --git a/ppapi/proxy/plugin_dispatcher.h b/ppapi/proxy/plugin_dispatcher.h
index 7a3fe87..613edc9 100644
--- a/ppapi/proxy/plugin_dispatcher.h
+++ b/ppapi/proxy/plugin_dispatcher.h
@@ -235,7 +235,7 @@
// be the pointer to the interface pointer supplied by the plugin if it's
// supported, or NULL if it's not supported. This allows us to cache failures
// and not req-query if a plugin doesn't support the interface.
- typedef base::hash_map<std::string, const void*> InterfaceMap;
+ typedef std::unordered_map<std::string, const void*> InterfaceMap;
InterfaceMap plugin_interfaces_;
typedef std::unordered_map<PP_Instance, std::unique_ptr<InstanceData>>
diff --git a/ppapi/proxy/raw_var_data.cc b/ppapi/proxy/raw_var_data.cc
index 510a25cc..dfa5626d 100644
--- a/ppapi/proxy/raw_var_data.cc
+++ b/ppapi/proxy/raw_var_data.cc
@@ -43,11 +43,11 @@
// is newly created. The index into |data| pointing to the result is returned.
// |visited_map| keeps track of RawVarDatas that have already been created.
size_t GetOrCreateRawVarData(const PP_Var& var,
- base::hash_map<int64_t, size_t>* visited_map,
+ std::unordered_map<int64_t, size_t>* visited_map,
std::vector<std::unique_ptr<RawVarData>>* data) {
if (VarTracker::IsVarTypeRefcounted(var.type)) {
- base::hash_map<int64_t, size_t>::iterator it = visited_map->find(
- var.value.as_id);
+ std::unordered_map<int64_t, size_t>::iterator it =
+ visited_map->find(var.value.as_id);
if (it != visited_map->end()) {
return it->second;
} else {
@@ -87,7 +87,7 @@
PP_Instance instance) {
std::unique_ptr<RawVarDataGraph> graph(new RawVarDataGraph);
// Map of |var.value.as_id| to a RawVarData index in RawVarDataGraph.
- base::hash_map<int64_t, size_t> visited_map;
+ std::unordered_map<int64_t, size_t> visited_map;
base::hash_set<int64_t> parent_ids;
base::stack<StackEntry> stack;
diff --git a/ppapi/proxy/video_decoder_resource.h b/ppapi/proxy/video_decoder_resource.h
index 2f67587..88db77fe 100644
--- a/ppapi/proxy/video_decoder_resource.h
+++ b/ppapi/proxy/video_decoder_resource.h
@@ -8,6 +8,7 @@
#include <stdint.h>
#include <memory>
+#include <unordered_map>
#include <vector>
#include "base/containers/hash_tables.h"
@@ -149,7 +150,7 @@
ShmBufferList available_shm_buffers_;
// Map of GL texture id to texture info.
- using TextureMap = base::hash_map<uint32_t, Texture>;
+ using TextureMap = std::unordered_map<uint32_t, Texture>;
TextureMap textures_;
// Queue of received pictures.
diff --git a/ppapi/shared_impl/resource_tracker.h b/ppapi/shared_impl/resource_tracker.h
index 38a7a835..9ee9a3c 100644
--- a/ppapi/shared_impl/resource_tracker.h
+++ b/ppapi/shared_impl/resource_tracker.h
@@ -9,6 +9,7 @@
#include <memory>
#include <set>
+#include <unordered_map>
#include "base/containers/hash_tables.h"
#include "base/macros.h"
@@ -106,7 +107,7 @@
// going away (otherwise, they may crash if they outlive the instance).
ResourceSet resources;
};
- typedef base::hash_map<PP_Instance, std::unique_ptr<InstanceData>>
+ typedef std::unordered_map<PP_Instance, std::unique_ptr<InstanceData>>
InstanceMap;
InstanceMap instance_map_;
@@ -120,7 +121,7 @@
//
// A resource will be in this list as long as the object is alive.
typedef std::pair<Resource*, int> ResourceAndRefCount;
- typedef base::hash_map<PP_Resource, ResourceAndRefCount> ResourceMap;
+ typedef std::unordered_map<PP_Resource, ResourceAndRefCount> ResourceMap;
ResourceMap live_resources_;
int32_t last_resource_value_;
diff --git a/ppapi/shared_impl/test_utils.cc b/ppapi/shared_impl/test_utils.cc
index 18bc9e3..d94c20ce 100644
--- a/ppapi/shared_impl/test_utils.cc
+++ b/ppapi/shared_impl/test_utils.cc
@@ -8,6 +8,7 @@
#include <stdint.h>
#include <cmath>
+#include <unordered_map>
#include "base/containers/hash_tables.h"
#include "base/logging.h"
@@ -29,14 +30,14 @@
bool Equals(const PP_Var& expected,
const PP_Var& actual,
bool test_string_references,
- base::hash_map<int64_t, int64_t>* visited_map) {
+ std::unordered_map<int64_t, int64_t>* visited_map) {
if (expected.type != actual.type) {
LOG(ERROR) << "expected type: " << expected.type
<< " actual type: " << actual.type;
return false;
}
if (VarTracker::IsVarTypeRefcounted(expected.type)) {
- base::hash_map<int64_t, int64_t>::iterator it =
+ std::unordered_map<int64_t, int64_t>::iterator it =
visited_map->find(expected.value.as_id);
if (it != visited_map->end()) {
if (it->second != actual.value.as_id) {
@@ -208,7 +209,7 @@
bool TestEqual(const PP_Var& expected,
const PP_Var& actual,
bool test_string_references) {
- base::hash_map<int64_t, int64_t> visited_map;
+ std::unordered_map<int64_t, int64_t> visited_map;
return Equals(expected, actual, test_string_references, &visited_map);
}
diff --git a/ppapi/shared_impl/var_tracker.h b/ppapi/shared_impl/var_tracker.h
index 9e5439f97..1203ab1 100644
--- a/ppapi/shared_impl/var_tracker.h
+++ b/ppapi/shared_impl/var_tracker.h
@@ -8,6 +8,7 @@
#include <stdint.h>
#include <memory>
+#include <unordered_map>
#include <vector>
#include "base/containers/hash_tables.h"
@@ -173,7 +174,7 @@
// we know when we can stop tracking this object.
int track_with_no_reference_count;
};
- typedef base::hash_map<int32_t, VarInfo> VarMap;
+ typedef std::unordered_map<int32_t, VarInfo> VarMap;
// Specifies what should happen with the refcount when calling AddVarInternal.
enum AddVarRefMode {
diff --git a/tools/android/forwarder2/device_controller.h b/tools/android/forwarder2/device_controller.h
index 9b3e3a1..953c68a 100644
--- a/tools/android/forwarder2/device_controller.h
+++ b/tools/android/forwarder2/device_controller.h
@@ -7,6 +7,7 @@
#include <memory>
#include <string>
+#include <unordered_map>
#include "base/containers/hash_tables.h"
#include "base/macros.h"
@@ -52,7 +53,8 @@
// Lets ensure DeviceListener instances are deleted on the thread they were
// created on.
const scoped_refptr<base::SingleThreadTaskRunner> construction_task_runner_;
- base::hash_map<int /* port */, std::unique_ptr<DeviceListener>> listeners_;
+ std::unordered_map<int /* port */, std::unique_ptr<DeviceListener>>
+ listeners_;
//WeakPtrFactory's documentation says:
// Member variables should appear before the WeakPtrFactory, to ensure
diff --git a/tools/android/forwarder2/host_controllers_manager.cc b/tools/android/forwarder2/host_controllers_manager.cc
index 6362234..2b3428a2 100644
--- a/tools/android/forwarder2/host_controllers_manager.cc
+++ b/tools/android/forwarder2/host_controllers_manager.cc
@@ -232,7 +232,7 @@
void HostControllersManager::RemoveAdbPortForDeviceIfNeeded(
const std::string& adb_path,
const std::string& device_serial) {
- base::hash_map<std::string, int>::const_iterator it =
+ std::unordered_map<std::string, int>::const_iterator it =
device_serial_to_adb_port_map_.find(device_serial);
if (it == device_serial_to_adb_port_map_.end())
return;
@@ -278,7 +278,7 @@
int HostControllersManager::GetAdbPortForDevice(
const std::string adb_path,
const std::string& device_serial) {
- base::hash_map<std::string, int>::const_iterator it =
+ std::unordered_map<std::string, int>::const_iterator it =
device_serial_to_adb_port_map_.find(device_serial);
if (it != device_serial_to_adb_port_map_.end())
return it->second;
diff --git a/tools/android/forwarder2/host_controllers_manager.h b/tools/android/forwarder2/host_controllers_manager.h
index fbdb4532..4a86cb86 100644
--- a/tools/android/forwarder2/host_controllers_manager.h
+++ b/tools/android/forwarder2/host_controllers_manager.h
@@ -7,6 +7,7 @@
#include <memory>
#include <string>
+#include <unordered_map>
#include "base/at_exit.h"
#include "base/containers/hash_tables.h"
@@ -44,7 +45,7 @@
FRIEND_TEST_ALL_PREFIXES(HostControllersManagerTest, AdbArgumentSequence);
using HostControllerMap =
- base::hash_map<std::string, std::unique_ptr<HostController>>;
+ std::unordered_map<std::string, std::unique_ptr<HostController>>;
static std::string MakeHostControllerMapKey(int adb_port, int device_port);
@@ -102,7 +103,7 @@
virtual bool GetAppOutputAndError(const std::vector<std::string>& argv,
std::string* output);
- base::hash_map<std::string, int> device_serial_to_adb_port_map_;
+ std::unordered_map<std::string, int> device_serial_to_adb_port_map_;
std::unique_ptr<HostControllerMap> controllers_;
std::unique_ptr<base::AtExitManager>
at_exit_manager_; // Needed by base::Thread.
diff --git a/tools/android/memdump/memdump.cc b/tools/android/memdump/memdump.cc
index 572a838d..9d27a55c 100644
--- a/tools/android/memdump/memdump.cc
+++ b/tools/android/memdump/memdump.cc
@@ -15,6 +15,7 @@
#include <iostream>
#include <limits>
#include <string>
+#include <unordered_map>
#include <utility>
#include <vector>
@@ -123,7 +124,7 @@
}
// Number of times a physical page is mapped in a process.
-typedef base::hash_map<uint64_t, int> PFNMap;
+typedef std::unordered_map<uint64_t, int> PFNMap;
// Parses lines from /proc/<PID>/maps, e.g.:
// 401e7000-401f5000 r-xp 00000000 103:02 158 /system/bin/linker
diff --git a/tools/imagediff/image_diff.cc b/tools/imagediff/image_diff.cc
index c3b4415..2b051363 100644
--- a/tools/imagediff/image_diff.cc
+++ b/tools/imagediff/image_diff.cc
@@ -15,6 +15,7 @@
#include <iostream>
#include <memory>
#include <string>
+#include <unordered_map>
#include <vector>
#include "base/command_line.h"
@@ -175,7 +176,7 @@
return 100.0f * pixels_different / total_pixels;
}
-typedef base::hash_map<uint32_t, int32_t> RgbaToCountMap;
+typedef std::unordered_map<uint32_t, int32_t> RgbaToCountMap;
float HistogramPercentageDifferent(const Image& baseline, const Image& actual) {
// TODO(johnme): Consider using a joint histogram instead, as described in
diff --git a/tools/ipc_fuzzer/fuzzer/fuzzer.h b/tools/ipc_fuzzer/fuzzer/fuzzer.h
index 38bf58f2..531bbe774 100644
--- a/tools/ipc_fuzzer/fuzzer/fuzzer.h
+++ b/tools/ipc_fuzzer/fuzzer/fuzzer.h
@@ -10,6 +10,7 @@
#include <memory>
#include <string>
+#include <unordered_map>
#include <vector>
#include "base/strings/string_util.h"
@@ -73,7 +74,7 @@
// Used for mutating messages. Once populated, the map associates a message ID
// with a FuzzerFunction used for mutation of that message type.
-using FuzzerFunctionMap = base::hash_map<uint32_t, FuzzerFunction>;
+using FuzzerFunctionMap = std::unordered_map<uint32_t, FuzzerFunction>;
void PopulateFuzzerFunctionMap(FuzzerFunctionMap* map);
// Used for generating new messages. Once populated, the vector contains
diff --git a/ui/accessibility/ax_table_info.h b/ui/accessibility/ax_table_info.h
index 167c5818..3929109 100644
--- a/ui/accessibility/ax_table_info.h
+++ b/ui/accessibility/ax_table_info.h
@@ -6,6 +6,7 @@
#define UI_ACCESSIBILITY_AX_TABLE_INFO_H_
#include <set>
+#include <unordered_map>
#include <vector>
#include "base/containers/hash_tables.h"
@@ -80,7 +81,7 @@
std::vector<AXNode*> extra_mac_nodes;
// Map from each cell's node ID to its index in unique_cell_ids.
- base::hash_map<int32_t, int32_t> cell_id_to_index;
+ std::unordered_map<int32_t, int32_t> cell_id_to_index;
// Map from each row's node ID to its row index.
base::hash_map<int32_t, int32_t> row_id_to_index;
diff --git a/ui/accessibility/ax_tree.h b/ui/accessibility/ax_tree.h
index 95cc105..dba99ae 100644
--- a/ui/accessibility/ax_tree.h
+++ b/ui/accessibility/ax_tree.h
@@ -8,6 +8,7 @@
#include <stdint.h>
#include <set>
+#include <unordered_map>
#include "base/containers/hash_tables.h"
#include "base/observer_list.h"
@@ -203,7 +204,7 @@
base::ObserverList<AXTreeObserver> observers_;
AXNode* root_ = nullptr;
- base::hash_map<int32_t, AXNode*> id_map_;
+ std::unordered_map<int32_t, AXNode*> id_map_;
std::string error_;
AXTreeData data_;
@@ -218,7 +219,7 @@
// Map from node ID to cached table info, if the given node is a table.
// Invalidated every time the tree is updated.
- mutable base::hash_map<int32_t, AXTableInfo*> table_info_map_;
+ mutable std::unordered_map<int32_t, AXTableInfo*> table_info_map_;
// The next negative node ID to use for internal nodes.
int32_t next_negative_internal_node_id_ = -1;
diff --git a/ui/accessibility/ax_tree_serializer.h b/ui/accessibility/ax_tree_serializer.h
index 21f8e6f..4e7a6e1f 100644
--- a/ui/accessibility/ax_tree_serializer.h
+++ b/ui/accessibility/ax_tree_serializer.h
@@ -8,6 +8,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <unordered_map>
#include <vector>
#include "base/containers/hash_tables.h"
@@ -183,7 +184,7 @@
ClientTreeNode* client_root_ = nullptr;
// A map from IDs to nodes in the client tree.
- base::hash_map<int32_t, ClientTreeNode*> client_id_map_;
+ std::unordered_map<int32_t, ClientTreeNode*> client_id_map_;
// The maximum number of nodes to serialize in a given call to
// SerializeChanges, or 0 if there's no maximum.
@@ -347,7 +348,7 @@
ClientTreeNode*
AXTreeSerializer<AXSourceNode, AXNodeData, AXTreeData>::ClientTreeNodeById(
int32_t id) {
- base::hash_map<int32_t, ClientTreeNode*>::iterator iter =
+ std::unordered_map<int32_t, ClientTreeNode*>::iterator iter =
client_id_map_.find(id);
if (iter != client_id_map_.end())
return iter->second;
@@ -529,7 +530,7 @@
// first in a separate pass so that nodes that are reparented
// don't end up children of two different parents in the middle
// of an update, which can lead to a double-free.
- base::hash_map<int32_t, ClientTreeNode*> client_child_id_map;
+ std::unordered_map<int32_t, ClientTreeNode*> client_child_id_map;
std::vector<ClientTreeNode*> old_children;
old_children.swap(client_node->children);
for (size_t i = 0; i < old_children.size(); ++i) {
diff --git a/ui/accessibility/ax_tree_update.h b/ui/accessibility/ax_tree_update.h
index a2d8e28..0f70cd2 100644
--- a/ui/accessibility/ax_tree_update.h
+++ b/ui/accessibility/ax_tree_update.h
@@ -9,6 +9,7 @@
#include <stdint.h>
#include <string>
+#include <unordered_map>
#include <vector>
#include "base/containers/hash_tables.h"
@@ -103,7 +104,7 @@
// to the rest of the tree for context, so we have to try to show the
// relative indentation of child nodes in this update relative to their
// parents.
- base::hash_map<int32_t, int> id_to_indentation;
+ std::unordered_map<int32_t, int> id_to_indentation;
for (size_t i = 0; i < nodes.size(); ++i) {
int indent = id_to_indentation[nodes[i].id];
result += std::string(2 * indent, ' ');
diff --git a/ui/accessibility/platform/ax_platform_node_auralinux.cc b/ui/accessibility/platform/ax_platform_node_auralinux.cc
index ecba303..65de261 100644
--- a/ui/accessibility/platform/ax_platform_node_auralinux.cc
+++ b/ui/accessibility/platform/ax_platform_node_auralinux.cc
@@ -9,6 +9,7 @@
#include <algorithm>
#include <memory>
#include <string>
+#include <unordered_map>
#include <utility>
#include <vector>
@@ -1454,7 +1455,7 @@
return AtkObjectToAXPlatformNodeAuraLinux(accessible);
}
-using UniqueIdMap = base::hash_map<int32_t, AXPlatformNodeAuraLinux*>;
+using UniqueIdMap = std::unordered_map<int32_t, AXPlatformNodeAuraLinux*>;
// Map from each AXPlatformNode's unique id to its instance.
base::LazyInstance<UniqueIdMap>::Leaky g_unique_id_map =
LAZY_INSTANCE_INITIALIZER;
diff --git a/ui/accessibility/platform/ax_platform_node_win.cc b/ui/accessibility/platform/ax_platform_node_win.cc
index 212abd0..aee5d86 100644
--- a/ui/accessibility/platform/ax_platform_node_win.cc
+++ b/ui/accessibility/platform/ax_platform_node_win.cc
@@ -10,6 +10,7 @@
#include <map>
#include <set>
#include <string>
+#include <unordered_map>
#include <utility>
#include <vector>
@@ -244,7 +245,7 @@
return ax_platform_node.Get();
}
-using UniqueIdMap = base::hash_map<int32_t, AXPlatformNode*>;
+using UniqueIdMap = std::unordered_map<int32_t, AXPlatformNode*>;
// Map from each AXPlatformNode's unique id to its instance.
base::LazyInstance<UniqueIdMap>::Leaky g_unique_id_map =
LAZY_INSTANCE_INITIALIZER;
diff --git a/ui/accessibility/platform/test_ax_node_wrapper.cc b/ui/accessibility/platform/test_ax_node_wrapper.cc
index a044980..98006e1 100644
--- a/ui/accessibility/platform/test_ax_node_wrapper.cc
+++ b/ui/accessibility/platform/test_ax_node_wrapper.cc
@@ -16,7 +16,7 @@
namespace {
// A global map from AXNodes to TestAXNodeWrappers.
-base::hash_map<AXNode*, TestAXNodeWrapper*> g_node_to_wrapper_map;
+std::unordered_map<AXNode*, TestAXNodeWrapper*> g_node_to_wrapper_map;
// A global coordinate offset.
gfx::Vector2d g_offset;
diff --git a/ui/compositor/test/in_process_context_factory.h b/ui/compositor/test/in_process_context_factory.h
index 1dd70c5..1ecf65d 100644
--- a/ui/compositor/test/in_process_context_factory.h
+++ b/ui/compositor/test/in_process_context_factory.h
@@ -7,6 +7,7 @@
#include <stdint.h>
#include <memory>
+#include <unordered_map>
#include "base/macros.h"
#include "cc/test/test_image_factory.h"
@@ -114,7 +115,7 @@
viz::RendererSettings renderer_settings_;
using PerCompositorDataMap =
- base::hash_map<ui::Compositor*, std::unique_ptr<PerCompositorData>>;
+ std::unordered_map<ui::Compositor*, std::unique_ptr<PerCompositorData>>;
PerCompositorDataMap per_compositor_data_;
DISALLOW_COPY_AND_ASSIGN(InProcessContextFactory);
diff --git a/ui/events/keycodes/keysym_to_unicode.cc b/ui/events/keycodes/keysym_to_unicode.cc
index d58059cf..6865b0d 100644
--- a/ui/events/keycodes/keysym_to_unicode.cc
+++ b/ui/events/keycodes/keysym_to_unicode.cc
@@ -839,7 +839,7 @@
}
private:
- typedef base::hash_map<KeySym, uint16_t> KeySymToUnicodeMap;
+ typedef std::unordered_map<KeySym, uint16_t> KeySymToUnicodeMap;
KeySymToUnicodeMap keysym_to_unicode_map_;
DISALLOW_COPY_AND_ASSIGN(KeySymToUnicode);
diff --git a/ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc b/ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc
index bc8fd80..3756b1f5 100644
--- a/ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc
+++ b/ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc
@@ -614,7 +614,7 @@
// Unowned default properties (owned by the configuration file). Their values
// will be applied when a property of the same name is created. These are
// usually only a small portion of all properties in use.
- base::hash_map<std::string, GesturesProp*> default_properties;
+ std::unordered_map<std::string, GesturesProp*> default_properties;
};
// Base class for device match criterias in conf files.
diff --git a/ui/gfx/generic_shared_memory_id.h b/ui/gfx/generic_shared_memory_id.h
index ed77e529..9374b06 100644
--- a/ui/gfx/generic_shared_memory_id.h
+++ b/ui/gfx/generic_shared_memory_id.h
@@ -49,12 +49,12 @@
} // namespace gfx
-namespace BASE_HASH_NAMESPACE {
+namespace std {
template <>
struct hash<gfx::GenericSharedMemoryId> {
size_t operator()(gfx::GenericSharedMemoryId key) const {
- return BASE_HASH_NAMESPACE::hash<int>()(key.id);
+ return std::hash<int>()(key.id);
}
};
@@ -66,6 +66,6 @@
}
};
-} // namespace BASE_HASH_NAMESPACE
+} // namespace std
#endif // UI_GFX_GENERIC_SHARED_MEMORY_ID_H_
diff --git a/ui/gfx/sequential_id_generator.h b/ui/gfx/sequential_id_generator.h
index 40bda2e..aca503f1 100644
--- a/ui/gfx/sequential_id_generator.h
+++ b/ui/gfx/sequential_id_generator.h
@@ -8,6 +8,7 @@
#include <stdint.h>
#include <map>
+#include <unordered_map>
#include "base/containers/hash_tables.h"
#include "base/macros.h"
@@ -39,7 +40,7 @@
void ResetForTest();
private:
- typedef base::hash_map<uint32_t, uint32_t> IDMap;
+ typedef std::unordered_map<uint32_t, uint32_t> IDMap;
uint32_t GetNextAvailableID();