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

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

Issue 2165123002: Make ExternalDataUseReporter independent of other data use classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 <memory> 10 #include <memory>
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // the TabDataUseObserver. 144 // the TabDataUseObserver.
145 virtual void OnTrackingLabelRemoved(const std::string& label); 145 virtual void OnTrackingLabelRemoved(const std::string& label);
146 146
147 // Gets the tracking information for the tab with id |tab_id| at time 147 // Gets the tracking information for the tab with id |tab_id| at time
148 // |timestamp|. |output_info| must not be null. If a tab tracking session is 148 // |timestamp|. |output_info| must not be null. If a tab tracking session is
149 // found that was active at |timestamp|, returns true and 149 // found that was active at |timestamp|, returns true and
150 // |output_tracking_info| is populated with its information. Otherwise, 150 // |output_tracking_info| is populated with its information. Otherwise,
151 // returns false. 151 // returns false.
152 virtual bool GetTrackingInfoForTabAtTime( 152 virtual bool GetTrackingInfoForTabAtTime(
153 SessionID::id_type tab_id, 153 SessionID::id_type tab_id,
154 base::TimeTicks timestamp, 154 const base::TimeTicks& timestamp,
tbansal1 2016/07/21 00:19:30 Passing by value is preferable. See https://cs.chr
Raj 2016/07/21 04:09:16 Done.
155 TrackingInfo* output_tracking_info) const; 155 TrackingInfo* output_tracking_info) const;
156 156
157 // Returns true if the navigation event would end the tracking session for 157 // Returns true if the navigation event would end the tracking session for
158 // |tab_id|. |transition| is the type of the UI event/transition. |url| is the 158 // |tab_id|. |transition| is the type of the UI event/transition. |url| is the
159 // URL in the tab. |navigation_entry| which can be null corresponds to the 159 // URL in the tab. |navigation_entry| which can be null corresponds to the
160 // navigation entry of the current navigation in back-forward navigation 160 // navigation entry of the current navigation in back-forward navigation
161 // history. 161 // history.
162 bool WouldNavigationEventEndTracking( 162 bool WouldNavigationEventEndTracking(
163 SessionID::id_type tab_id, 163 SessionID::id_type tab_id,
164 TransitionType transition, 164 TransitionType transition,
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 base::WeakPtrFactory<DataUseTabModel> weak_factory_; 322 base::WeakPtrFactory<DataUseTabModel> weak_factory_;
323 323
324 DISALLOW_COPY_AND_ASSIGN(DataUseTabModel); 324 DISALLOW_COPY_AND_ASSIGN(DataUseTabModel);
325 }; 325 };
326 326
327 } // namespace android 327 } // namespace android
328 328
329 } // namespace chrome 329 } // namespace chrome
330 330
331 #endif // CHROME_BROWSER_ANDROID_DATA_USAGE_DATA_USE_TAB_MODEL_H_ 331 #endif // CHROME_BROWSER_ANDROID_DATA_USAGE_DATA_USE_TAB_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698