| Index: chrome/browser/net/load_timing_observer.h
|
| ===================================================================
|
| --- chrome/browser/net/load_timing_observer.h (revision 65207)
|
| +++ chrome/browser/net/load_timing_observer.h (working copy)
|
| @@ -43,8 +43,6 @@
|
| LoadTimingObserver();
|
| ~LoadTimingObserver();
|
|
|
| - URLRequestRecord* GetURLRequestRecord(uint32 source_id);
|
| -
|
| // Observer implementation:
|
| virtual void OnAddEntry(net::NetLog::EventType type,
|
| const base::TimeTicks& time,
|
| @@ -61,6 +59,8 @@
|
| FRIEND_TEST_ALL_PREFIXES(LoadTimingObserverTest,
|
| SocketRecord);
|
|
|
| + // Note that |lock_| must be acquired before calling all of the following
|
| + // functions.
|
| void OnAddURLRequestEntry(net::NetLog::EventType type,
|
| const base::TimeTicks& time,
|
| const net::NetLog::Source& source,
|
| @@ -79,9 +79,12 @@
|
| net::NetLog::EventPhase phase,
|
| net::NetLog::EventParameters* params);
|
|
|
| - URLRequestRecord* CreateURLRequestRecord(uint32 source_id);
|
| - void DeleteURLRequestRecord(uint32 source_id);
|
| + // |lock_| must be aquired for as long as the returned |URLRequestRecord*|
|
| + // is in use.
|
| + URLRequestRecord* GetURLRequestRecord(uint32 source_id);
|
|
|
| + Lock lock_;
|
| +
|
| typedef base::hash_map<uint32, URLRequestRecord> URLRequestToRecordMap;
|
| typedef base::hash_map<uint32, ConnectJobRecord> ConnectJobToRecordMap;
|
| typedef base::hash_map<uint32, SocketRecord> SocketToRecordMap;
|
|
|