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

Unified Diff: chrome/browser/net/network_stats.h

Issue 102993007: UDP NetConnectivity tests - added read/write states to handle pending (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: new NetConnectivity5 histograms Created 7 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
« no previous file with comments | « no previous file | chrome/browser/net/network_stats.cc » ('j') | tools/metrics/histograms/histograms.xml » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/network_stats.h
diff --git a/chrome/browser/net/network_stats.h b/chrome/browser/net/network_stats.h
index 206f6228d5d1d5080bfce6029c15be69e659c5b6..562eb759bf763d120b5f2b075d20578f50a00339 100644
--- a/chrome/browser/net/network_stats.h
+++ b/chrome/browser/net/network_stats.h
@@ -66,6 +66,16 @@ class NetworkStats {
STATUS_MAX, // Bounding value.
};
+ enum ReadState { // Used to track if |socket_| has a pending read.
+ READ_STATE_IDLE,
+ READ_STATE_READ_PENDING,
+ };
+
+ enum WriteState { // Used to track if |socket_| has a pending write.
+ WRITE_STATE_IDLE,
+ WRITE_STATE_WRITE_PENDING,
+ };
+
// |TestType| specifies the possible tests we may run
// (except for the first and the last serving as boundaries).
enum TestType {
@@ -306,6 +316,10 @@ class NetworkStats {
// Token received from server for authentication.
ProbePacket_Token token_;
+ // The state variables to track pending reads/writes.
+ ReadState read_state_;
+ WriteState write_state_;
+
// We use this factory to create timeout tasks for socket's ReadData.
base::WeakPtrFactory<NetworkStats> weak_factory_;
« no previous file with comments | « no previous file | chrome/browser/net/network_stats.cc » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698