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

Side by Side Diff: chrome/browser/net/load_timing_observer.cc

Issue 5384002: net: Remove typedef net::URLRequest URLRequest; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "chrome/browser/net/load_timing_observer.h" 5 #include "chrome/browser/net/load_timing_observer.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/time.h" 8 #include "base/time.h"
9 #include "chrome/browser/net/chrome_net_log.h" 9 #include "chrome/browser/net/chrome_net_log.h"
10 #include "chrome/common/resource_response.h" 10 #include "chrome/common/resource_response.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 net::NetLog::EventParameters* params) { 75 net::NetLog::EventParameters* params) {
76 if (source.type == net::NetLog::SOURCE_URL_REQUEST) 76 if (source.type == net::NetLog::SOURCE_URL_REQUEST)
77 OnAddURLRequestEntry(type, time, source, phase, params); 77 OnAddURLRequestEntry(type, time, source, phase, params);
78 else if (source.type == net::NetLog::SOURCE_CONNECT_JOB) 78 else if (source.type == net::NetLog::SOURCE_CONNECT_JOB)
79 OnAddConnectJobEntry(type, time, source, phase, params); 79 OnAddConnectJobEntry(type, time, source, phase, params);
80 else if (source.type == net::NetLog::SOURCE_SOCKET) 80 else if (source.type == net::NetLog::SOURCE_SOCKET)
81 OnAddSocketEntry(type, time, source, phase, params); 81 OnAddSocketEntry(type, time, source, phase, params);
82 } 82 }
83 83
84 // static 84 // static
85 void LoadTimingObserver::PopulateTimingInfo(URLRequest* request, 85 void LoadTimingObserver::PopulateTimingInfo(net::URLRequest* request,
86 ResourceResponse* response) { 86 ResourceResponse* response) {
87 if (!(request->load_flags() & net::LOAD_ENABLE_LOAD_TIMING)) 87 if (!(request->load_flags() & net::LOAD_ENABLE_LOAD_TIMING))
88 return; 88 return;
89 89
90 ChromeNetLog* chrome_net_log = static_cast<ChromeNetLog*>( 90 ChromeNetLog* chrome_net_log = static_cast<ChromeNetLog*>(
91 request->net_log().net_log()); 91 request->net_log().net_log());
92 if (chrome_net_log == NULL) 92 if (chrome_net_log == NULL)
93 return; 93 return;
94 94
95 uint32 source_id = request->net_log().source().id; 95 uint32 source_id = request->net_log().source().id;
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 if (it == socket_to_record_.end()) 278 if (it == socket_to_record_.end())
279 return; 279 return;
280 280
281 if (type == net::NetLog::TYPE_SSL_CONNECT) { 281 if (type == net::NetLog::TYPE_SSL_CONNECT) {
282 if (is_begin) 282 if (is_begin)
283 it->second.ssl_start = time; 283 it->second.ssl_start = time;
284 else if (is_end) 284 else if (is_end)
285 it->second.ssl_end = time; 285 it->second.ssl_end = time;
286 } 286 }
287 } 287 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698