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

Unified Diff: chrome/browser/data_use_measurement/chrome_data_use_ascriber.h

Issue 2829163004: Remove uses of base::hash_map from //chrome (Closed)
Patch Set: Fixes Created 3 years, 7 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: chrome/browser/data_use_measurement/chrome_data_use_ascriber.h
diff --git a/chrome/browser/data_use_measurement/chrome_data_use_ascriber.h b/chrome/browser/data_use_measurement/chrome_data_use_ascriber.h
index e27a756bd0a31e83bf094d25d595a47cfe360dd6..381072d871a08af93bad2b8239359e519c4abf7a 100644
--- a/chrome/browser/data_use_measurement/chrome_data_use_ascriber.h
+++ b/chrome/browser/data_use_measurement/chrome_data_use_ascriber.h
@@ -6,13 +6,12 @@
#define CHROME_BROWSER_DATA_USE_MEASUREMENT_CHROME_DATA_USE_ASCRIBER_H_
#include <list>
+#include <map>
#include <memory>
#include <string>
#include <tuple>
-#include <unordered_map>
#include <utility>
-#include "base/containers/hash_tables.h"
#include "base/hash.h"
#include "base/macros.h"
#include "base/supports_user_data.h"
@@ -118,13 +117,6 @@ class ChromeDataUseAscriber : public DataUseAscriber {
typedef std::list<ChromeDataUseRecorder> DataUseRecorderList;
typedef DataUseRecorderList::iterator DataUseRecorderEntry;
- struct GlobalRequestIDHash {
- public:
- std::size_t operator()(const content::GlobalRequestID& x) const {
- return base::HashInts(x.child_id, x.request_id);
- }
- };
-
class DataUseRecorderEntryAsUserData : public base::SupportsUserData::Data {
public:
explicit DataUseRecorderEntryAsUserData(DataUseRecorderEntry entry);
@@ -160,24 +152,21 @@ class ChromeDataUseAscriber : public DataUseAscriber {
// Map from RenderFrameHost to the DataUseRecorderEntry in
// |data_use_recorders_| that the main frame ascribes data use to.
- base::hash_map<RenderFrameHostID, DataUseRecorderEntry>
+ std::map<RenderFrameHostID, DataUseRecorderEntry>
main_render_frame_data_use_map_;
// Maps subframe IDs to the mainframe ID, so the mainframe lifetime can have
// ownership over the lifetime of entries in |data_use_recorders_|. Mainframes
// are mapped to themselves.
- base::hash_map<RenderFrameHostID, RenderFrameHostID>
- subframe_to_mainframe_map_;
+ std::map<RenderFrameHostID, RenderFrameHostID> subframe_to_mainframe_map_;
// Map from pending navigations to the DataUseRecorderEntry in
// |data_use_recorders_| that the navigation ascribes data use to.
- std::unordered_map<content::GlobalRequestID,
- DataUseRecorderEntry,
- GlobalRequestIDHash>
+ std::map<content::GlobalRequestID, DataUseRecorderEntry>
pending_navigation_data_use_map_;
// Contains the mainframe IDs that are currently visible.
- base::hash_set<RenderFrameHostID> visible_main_render_frames_;
+ std::set<RenderFrameHostID> visible_main_render_frames_;
DISALLOW_COPY_AND_ASSIGN(ChromeDataUseAscriber);
};

Powered by Google App Engine
This is Rietveld 408576698