| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_NET_LOAD_TIMING_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_NET_LOAD_TIMING_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_NET_LOAD_TIMING_OBSERVER_H_ | 6 #define CHROME_BROWSER_NET_LOAD_TIMING_OBSERVER_H_ |
| 7 | 7 |
| 8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
| 9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 // LoadTimingObserver watches the NetLog event stream and collects the network | 22 // LoadTimingObserver watches the NetLog event stream and collects the network |
| 23 // timing information. | 23 // timing information. |
| 24 // | 24 // |
| 25 // LoadTimingObserver lives completely on the IOThread and ignores events from | 25 // LoadTimingObserver lives completely on the IOThread and ignores events from |
| 26 // other threads. It is not safe to use from other threads. | 26 // other threads. It is not safe to use from other threads. |
| 27 class LoadTimingObserver : public net::NetLog::ThreadSafeObserver { | 27 class LoadTimingObserver : public net::NetLog::ThreadSafeObserver { |
| 28 public: | 28 public: |
| 29 struct URLRequestRecord { | 29 struct URLRequestRecord { |
| 30 URLRequestRecord(); | 30 URLRequestRecord(); |
| 31 | 31 |
| 32 #if !defined(OS_IOS) |
| 32 webkit_glue::ResourceLoadTimingInfo timing; | 33 webkit_glue::ResourceLoadTimingInfo timing; |
| 34 #endif |
| 33 uint32 connect_job_id; | 35 uint32 connect_job_id; |
| 34 uint32 socket_log_id; | 36 uint32 socket_log_id; |
| 35 bool socket_reused; | 37 bool socket_reused; |
| 36 base::TimeTicks base_ticks; | 38 base::TimeTicks base_ticks; |
| 37 }; | 39 }; |
| 38 | 40 |
| 39 struct HTTPStreamJobRecord { | 41 struct HTTPStreamJobRecord { |
| 40 HTTPStreamJobRecord(); | 42 HTTPStreamJobRecord(); |
| 41 | 43 |
| 42 uint32 socket_log_id; | 44 uint32 socket_log_id; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 HTTPStreamJobToRecordMap http_stream_job_to_record_; | 103 HTTPStreamJobToRecordMap http_stream_job_to_record_; |
| 102 ConnectJobToRecordMap connect_job_to_record_; | 104 ConnectJobToRecordMap connect_job_to_record_; |
| 103 SocketToRecordMap socket_to_record_; | 105 SocketToRecordMap socket_to_record_; |
| 104 uint32 last_connect_job_id_; | 106 uint32 last_connect_job_id_; |
| 105 ConnectJobRecord last_connect_job_record_; | 107 ConnectJobRecord last_connect_job_record_; |
| 106 | 108 |
| 107 DISALLOW_COPY_AND_ASSIGN(LoadTimingObserver); | 109 DISALLOW_COPY_AND_ASSIGN(LoadTimingObserver); |
| 108 }; | 110 }; |
| 109 | 111 |
| 110 #endif // CHROME_BROWSER_NET_LOAD_TIMING_OBSERVER_H_ | 112 #endif // CHROME_BROWSER_NET_LOAD_TIMING_OBSERVER_H_ |
| OLD | NEW |