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

Side by Side Diff: chrome/browser/devtools/devtools_network_interceptor.h

Issue 1411183009: [DevTools] Narrow down DevToolsNetworkInterceptor::Throttable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_DEVTOOLS_DEVTOOLS_NETWORK_INTERCEPTOR_H_ 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_INTERCEPTOR_H_
6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_INTERCEPTOR_H_ 6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_INTERCEPTOR_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 10 matching lines...) Expand all
21 class TimeTicks; 21 class TimeTicks;
22 } 22 }
23 23
24 // DevToolsNetworkInterceptor emulates network conditions for transactions with 24 // DevToolsNetworkInterceptor emulates network conditions for transactions with
25 // specific client id. 25 // specific client id.
26 class DevToolsNetworkInterceptor { 26 class DevToolsNetworkInterceptor {
27 public: 27 public:
28 class Throttable { 28 class Throttable {
29 public: 29 public:
30 virtual ~Throttable() {} 30 virtual ~Throttable() {}
31 virtual bool HasStarted() = 0;
32 virtual bool HasFailed() = 0;
33 virtual void Fail() = 0; 31 virtual void Fail() = 0;
34 virtual int64_t ThrottledByteCount() = 0; 32 virtual int64_t ThrottledByteCount() = 0;
35 virtual void Throttled(int64_t count) = 0; 33 virtual void Throttled(int64_t count) = 0;
36 virtual void ThrottleFinished() = 0; 34 virtual void ThrottleFinished() = 0;
37 virtual void GetSendEndTiming(base::TimeTicks* send_end) = 0; 35 virtual void GetSendEndTiming(base::TimeTicks* send_end) = 0;
38 }; 36 };
39 37
40 DevToolsNetworkInterceptor(); 38 DevToolsNetworkInterceptor();
41 virtual ~DevToolsNetworkInterceptor(); 39 virtual ~DevToolsNetworkInterceptor();
42 40
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 base::TimeDelta tick_length_; 79 base::TimeDelta tick_length_;
82 base::TimeDelta latency_length_; 80 base::TimeDelta latency_length_;
83 uint64_t last_tick_; 81 uint64_t last_tick_;
84 82
85 base::WeakPtrFactory<DevToolsNetworkInterceptor> weak_ptr_factory_; 83 base::WeakPtrFactory<DevToolsNetworkInterceptor> weak_ptr_factory_;
86 84
87 DISALLOW_COPY_AND_ASSIGN(DevToolsNetworkInterceptor); 85 DISALLOW_COPY_AND_ASSIGN(DevToolsNetworkInterceptor);
88 }; 86 };
89 87
90 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_INTERCEPTOR_H_ 88 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_INTERCEPTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698