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

Side by Side Diff: chrome/browser/android/data_usage/data_use_ui_tab_model.h

Issue 2829163004: Remove uses of base::hash_map from //chrome (Closed)
Patch Set: Downloads back Created 3 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_ANDROID_DATA_USAGE_DATA_USE_UI_TAB_MODEL_H_ 5 #ifndef CHROME_BROWSER_ANDROID_DATA_USAGE_DATA_USE_UI_TAB_MODEL_H_
6 #define CHROME_BROWSER_ANDROID_DATA_USAGE_DATA_USE_UI_TAB_MODEL_H_ 6 #define CHROME_BROWSER_ANDROID_DATA_USAGE_DATA_USE_UI_TAB_MODEL_H_
7 7
8 #include <map>
8 #include <memory> 9 #include <memory>
9 #include <string> 10 #include <string>
10 11
11 #include "base/containers/hash_tables.h"
12 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/threading/thread_checker.h" 16 #include "base/threading/thread_checker.h"
17 #include "chrome/browser/android/data_usage/data_use_tab_model.h" 17 #include "chrome/browser/android/data_usage/data_use_tab_model.h"
18 #include "components/keyed_service/core/keyed_service.h" 18 #include "components/keyed_service/core/keyed_service.h"
19 #include "components/sessions/core/session_id.h" 19 #include "components/sessions/core/session_id.h"
20 #include "ui/base/page_transition_types.h" 20 #include "ui/base/page_transition_types.h"
21 #include "url/gurl.h" 21 #include "url/gurl.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 transition_type(transition_type), 129 transition_type(transition_type),
130 url(url), 130 url(url),
131 package(package) {} 131 package(package) {}
132 132
133 const SessionID::id_type tab_id; 133 const SessionID::id_type tab_id;
134 const DataUseTabModel::TransitionType transition_type; 134 const DataUseTabModel::TransitionType transition_type;
135 const GURL url; 135 const GURL url;
136 const std::string package; 136 const std::string package;
137 }; 137 };
138 138
139 typedef base::hash_map<SessionID::id_type, DataUseTrackingEvent> TabEvents; 139 typedef std::map<SessionID::id_type, DataUseTrackingEvent> TabEvents;
140 140
141 // DataUseTabModel::TabDataUseObserver implementation: 141 // DataUseTabModel::TabDataUseObserver implementation:
142 void NotifyTrackingStarting(SessionID::id_type tab_id) override; 142 void NotifyTrackingStarting(SessionID::id_type tab_id) override;
143 void NotifyTrackingEnding(SessionID::id_type tab_id) override; 143 void NotifyTrackingEnding(SessionID::id_type tab_id) override;
144 void OnDataUseTabModelReady() override; 144 void OnDataUseTabModelReady() override;
145 145
146 // Creates |event| for tab with id |tab_id| and value |event|, if there is no 146 // Creates |event| for tab with id |tab_id| and value |event|, if there is no
147 // existing entry for |tab_id|, and returns true. Otherwise, returns false 147 // existing entry for |tab_id|, and returns true. Otherwise, returns false
148 // without modifying the entry. 148 // without modifying the entry.
149 bool MaybeCreateTabEvent(SessionID::id_type tab_id, 149 bool MaybeCreateTabEvent(SessionID::id_type tab_id,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 base::WeakPtrFactory<DataUseUITabModel> weak_factory_; 196 base::WeakPtrFactory<DataUseUITabModel> weak_factory_;
197 197
198 DISALLOW_COPY_AND_ASSIGN(DataUseUITabModel); 198 DISALLOW_COPY_AND_ASSIGN(DataUseUITabModel);
199 }; 199 };
200 200
201 } // namespace android 201 } // namespace android
202 202
203 } // namespace chrome 203 } // namespace chrome
204 204
205 #endif // CHROME_BROWSER_ANDROID_DATA_USAGE_DATA_USE_UI_TAB_MODEL_H_ 205 #endif // CHROME_BROWSER_ANDROID_DATA_USAGE_DATA_USE_UI_TAB_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/data_usage/data_use_tab_model.h ('k') | chrome/browser/android/data_usage/external_data_use_reporter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698