| OLD | NEW |
| 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 <memory> | 10 #include <memory> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/callback.h" | 14 #include "base/callback.h" |
| 15 #include "base/callback_forward.h" | 15 #include "base/callback_forward.h" |
| 16 #include "base/containers/hash_tables.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 |
| 27 namespace base { | 27 namespace base { |
| 28 class SingleThreadTaskRunner; | |
| 29 class TickClock; | 28 class TickClock; |
| 30 } | 29 } |
| 31 | 30 |
| 32 namespace content { | 31 namespace content { |
| 33 class NavigationEntry; | 32 class NavigationEntry; |
| 34 } | 33 } |
| 35 | 34 |
| 36 namespace chrome { | 35 namespace chrome { |
| 37 | 36 |
| 38 namespace android { | 37 namespace android { |
| 39 | 38 |
| 40 class DataUseMatcher; | 39 class DataUseMatcher; |
| 41 class ExternalDataUseObserverBridge; | |
| 42 | 40 |
| 43 // Models tracking and labeling of data usage within each Tab. Within each tab, | 41 // Models tracking and labeling of data usage within each Tab. Within each tab, |
| 44 // the model tracks the data use of a sequence of navigations in a "tracking | 42 // the model tracks the data use of a sequence of navigations in a "tracking |
| 45 // session" beginning with an entry event and ending with an exit event. | 43 // session" beginning with an entry event and ending with an exit event. |
| 46 // Typically, these events are navigations matching a URL pattern, or various | 44 // Typically, these events are navigations matching a URL pattern, or various |
| 47 // types of browser-initiated navigations. A single tab may have several | 45 // types of browser-initiated navigations. A single tab may have several |
| 48 // disjoint "tracking sessions" depending on the sequence of entry and exit | 46 // disjoint "tracking sessions" depending on the sequence of entry and exit |
| 49 // events that took place. | 47 // events that took place. |
| 50 class DataUseTabModel { | 48 class DataUseTabModel { |
| 51 public: | 49 public: |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 base::WeakPtrFactory<DataUseTabModel> weak_factory_; | 320 base::WeakPtrFactory<DataUseTabModel> weak_factory_; |
| 323 | 321 |
| 324 DISALLOW_COPY_AND_ASSIGN(DataUseTabModel); | 322 DISALLOW_COPY_AND_ASSIGN(DataUseTabModel); |
| 325 }; | 323 }; |
| 326 | 324 |
| 327 } // namespace android | 325 } // namespace android |
| 328 | 326 |
| 329 } // namespace chrome | 327 } // namespace chrome |
| 330 | 328 |
| 331 #endif // CHROME_BROWSER_ANDROID_DATA_USAGE_DATA_USE_TAB_MODEL_H_ | 329 #endif // CHROME_BROWSER_ANDROID_DATA_USAGE_DATA_USE_TAB_MODEL_H_ |
| OLD | NEW |