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

Unified Diff: components/data_use_measurement/core/data_use_recorder.h

Issue 2572823002: Propogate the tab foreground, background change events to data use (Closed)
Patch Set: Fix trybot failure Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: components/data_use_measurement/core/data_use_recorder.h
diff --git a/components/data_use_measurement/core/data_use_recorder.h b/components/data_use_measurement/core/data_use_recorder.h
index d406c5b81a6c89b5b9689ebb48f173bdcb608206..561101268cd63b72bb9b24240536f5caf2c53ef5 100644
--- a/components/data_use_measurement/core/data_use_recorder.h
+++ b/components/data_use_measurement/core/data_use_recorder.h
@@ -39,6 +39,10 @@ class DataUseRecorder {
main_url_request_ = request;
}
+ bool is_visible() const { return is_visible_; }
+
+ void set_is_visible(bool is_visible) { is_visible_ = is_visible; }
+
// Returns whether data use is complete and no additional data can be used
// by the entity tracked by this recorder. For example,
bool IsDataUseComplete();
@@ -91,6 +95,9 @@ class DataUseRecorder {
// The network data use measured by this DataUseRecorder.
DataUse data_use_;
+ // Whether the entity that owns this data use is currently visible.
+ bool is_visible_;
+
DISALLOW_COPY_AND_ASSIGN(DataUseRecorder);
};

Powered by Google App Engine
This is Rietveld 408576698