Chromium Code Reviews| Index: chrome/browser/android/data_usage/data_use_ui_tab_model.h |
| diff --git a/chrome/browser/android/data_usage/data_use_ui_tab_model.h b/chrome/browser/android/data_usage/data_use_ui_tab_model.h |
| index 9e589d429544c5ca17d1ee8897586afd42279c70..edf416cfde1d8dc49f4ac99ebcb140ceb99189d3 100644 |
| --- a/chrome/browser/android/data_usage/data_use_ui_tab_model.h |
| +++ b/chrome/browser/android/data_usage/data_use_ui_tab_model.h |
| @@ -59,8 +59,8 @@ class DataUseUITabModel : public KeyedService, |
| // Reports a custom tab navigation to the DataUseTabModel on the IO thread. |
| // Includes the |tab_id|, |url|, and |package_name| for the navigation. |
| void ReportCustomTabInitialNavigation(SessionID::id_type tab_id, |
| - const std::string& url, |
| - const std::string& package_name); |
| + const std::string& package_name, |
| + const std::string& url); |
| // Returns true if data use tracking has been started for the tab with id |
| // |tab_id|. Calling this function resets the state of the tab. |
| @@ -74,11 +74,24 @@ class DataUseUITabModel : public KeyedService, |
| // caller. |
| void SetDataUseTabModel(DataUseTabModel* data_use_tab_model); |
| + // Returns true if the tab with id |tab_id| is currently tracked, and |
| + // starting the navigation to |url| with transition type |page_transition| |
| + // would end tracking of data use. |
| + bool WouldDataUseTrackingEnd(const std::string& url, |
| + int page_transition, |
| + SessionID::id_type tab_id) const; |
| + |
| + // Notifies that user clicked "Continue" when the dialog box with data use |
| + // warning was shown. Includes the |tab_id| on which the warning was shown. |
|
megjablon
2015/12/28 20:32:06
Add to comment the reason this is necessary.
tbansal1
2015/12/28 23:55:52
Done.
|
| + void UserClickedContinueOnDialogBox(SessionID::id_type tab_id); |
| + |
| base::WeakPtr<DataUseUITabModel> GetWeakPtr(); |
| private: |
| FRIEND_TEST_ALL_PREFIXES(DataUseUITabModelTest, ConvertTransitionType); |
| FRIEND_TEST_ALL_PREFIXES(DataUseUITabModelTest, EntranceExitState); |
| + FRIEND_TEST_ALL_PREFIXES(DataUseUITabModelTest, |
| + EntranceExitStateWithDialogBox); |
| FRIEND_TEST_ALL_PREFIXES(DataUseUITabModelTest, ReportTabEventsTest); |
| // DataUseTrackingEvent indicates the state of a tab. |
| @@ -88,6 +101,9 @@ class DataUseUITabModel : public KeyedService, |
| // Indicates that data use tracking has ended. |
| DATA_USE_TRACKING_ENDED, |
| + |
| + // Indicates that user clicked "Continue" when the dialog box was shown. |
| + DATA_USE_CONTINUE_CLICKED, |
| }; |
| typedef base::hash_map<SessionID::id_type, DataUseTrackingEvent> TabEvents; |