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

Side by Side Diff: chrome/browser/android/data_usage/data_use_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_TAB_MODEL_H_ 5 #ifndef CHROME_BROWSER_ANDROID_DATA_USAGE_DATA_USE_TAB_MODEL_H_
6 #define CHROME_BROWSER_ANDROID_DATA_USAGE_DATA_USE_TAB_MODEL_H_ 6 #define CHROME_BROWSER_ANDROID_DATA_USAGE_DATA_USE_TAB_MODEL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map>
10 #include <memory> 11 #include <memory>
11 #include <string> 12 #include <string>
12 #include <vector> 13 #include <vector>
13 14
14 #include "base/callback.h" 15 #include "base/callback.h"
15 #include "base/callback_forward.h" 16 #include "base/callback_forward.h"
16 #include "base/containers/hash_tables.h"
17 #include "base/gtest_prod_util.h" 17 #include "base/gtest_prod_util.h"
18 #include "base/macros.h" 18 #include "base/macros.h"
19 #include "base/memory/weak_ptr.h" 19 #include "base/memory/weak_ptr.h"
20 #include "base/observer_list.h" 20 #include "base/observer_list.h"
21 #include "base/threading/thread_checker.h" 21 #include "base/threading/thread_checker.h"
22 #include "base/time/time.h" 22 #include "base/time/time.h"
23 #include "chrome/browser/android/data_usage/tab_data_use_entry.h" 23 #include "chrome/browser/android/data_usage/tab_data_use_entry.h"
24 #include "components/sessions/core/session_id.h" 24 #include "components/sessions/core/session_id.h"
25 #include "url/gurl.h" 25 #include "url/gurl.h"
26 26
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 FRIEND_TEST_ALL_PREFIXES(DataUseTabModelTest, ObserverStartEndEvents); 232 FRIEND_TEST_ALL_PREFIXES(DataUseTabModelTest, ObserverStartEndEvents);
233 FRIEND_TEST_ALL_PREFIXES(DataUseTabModelTest, 233 FRIEND_TEST_ALL_PREFIXES(DataUseTabModelTest,
234 ProcessBufferedNavigationEventsAfterRuleFetch); 234 ProcessBufferedNavigationEventsAfterRuleFetch);
235 FRIEND_TEST_ALL_PREFIXES(DataUseTabModelTest, TabCloseEvent); 235 FRIEND_TEST_ALL_PREFIXES(DataUseTabModelTest, TabCloseEvent);
236 FRIEND_TEST_ALL_PREFIXES(DataUseTabModelTest, TabCloseEventEndsTracking); 236 FRIEND_TEST_ALL_PREFIXES(DataUseTabModelTest, TabCloseEventEndsTracking);
237 FRIEND_TEST_ALL_PREFIXES(DataUseTabModelTest, 237 FRIEND_TEST_ALL_PREFIXES(DataUseTabModelTest,
238 UnexpiredTabEntryRemovaltimeHistogram); 238 UnexpiredTabEntryRemovaltimeHistogram);
239 FRIEND_TEST_ALL_PREFIXES(ExternalDataUseObserverTest, 239 FRIEND_TEST_ALL_PREFIXES(ExternalDataUseObserverTest,
240 MatchingRuleFetchOnControlAppInstall); 240 MatchingRuleFetchOnControlAppInstall);
241 241
242 typedef base::hash_map<SessionID::id_type, TabDataUseEntry> TabEntryMap; 242 using TabEntryMap = std::map<SessionID::id_type, TabDataUseEntry>;
243 243
244 // Gets the current label of a tab, and the new label if a navigation event 244 // Gets the current label of a tab, and the new label if a navigation event
245 // occurs in the tab. |tab_id| is the source tab of the generated event, 245 // occurs in the tab. |tab_id| is the source tab of the generated event,
246 // |transition| indicates the type of the UI event/transition, |url| is the 246 // |transition| indicates the type of the UI event/transition, |url| is the
247 // URL in the source tab, |package| indicates the android package name of 247 // URL in the source tab, |package| indicates the android package name of
248 // external application that initiated the event. |navigation_entry| which can 248 // external application that initiated the event. |navigation_entry| which can
249 // be null is the navigation entry of the current navigation in back-forward 249 // be null is the navigation entry of the current navigation in back-forward
250 // history. |current_label|, |new_label| and |is_package_match| should not be 250 // history. |current_label|, |new_label| and |is_package_match| should not be
251 // null, and are set with current and new labels respectively. |current_label| 251 // null, and are set with current and new labels respectively. |current_label|
252 // will be set to empty string, if there is no active tracking session. 252 // will be set to empty string, if there is no active tracking session.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 base::WeakPtrFactory<DataUseTabModel> weak_factory_; 321 base::WeakPtrFactory<DataUseTabModel> weak_factory_;
322 322
323 DISALLOW_COPY_AND_ASSIGN(DataUseTabModel); 323 DISALLOW_COPY_AND_ASSIGN(DataUseTabModel);
324 }; 324 };
325 325
326 } // namespace android 326 } // namespace android
327 327
328 } // namespace chrome 328 } // namespace chrome
329 329
330 #endif // CHROME_BROWSER_ANDROID_DATA_USAGE_DATA_USE_TAB_MODEL_H_ 330 #endif // CHROME_BROWSER_ANDROID_DATA_USAGE_DATA_USE_TAB_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/compositor/tab_content_manager.h ('k') | chrome/browser/android/data_usage/data_use_ui_tab_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698