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

Side by Side Diff: net/http/http_network_layer.cc

Issue 10736066: Adding histograms showing fraction of page load times (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 months 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) 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 #include "net/http/http_network_layer.h" 5 #include "net/http/http_network_layer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "base/string_split.h" 9 #include "base/string_split.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } else if (option.empty() && it == spdy_options.begin()) { 95 } else if (option.empty() && it == spdy_options.begin()) {
96 continue; 96 continue;
97 } else { 97 } else {
98 LOG(DFATAL) << "Unrecognized spdy option: " << option; 98 LOG(DFATAL) << "Unrecognized spdy option: " << option;
99 } 99 }
100 } 100 }
101 } 101 }
102 102
103 //----------------------------------------------------------------------------- 103 //-----------------------------------------------------------------------------
104 104
105 int HttpNetworkLayer::CreateTransaction(scoped_ptr<HttpTransaction>* trans) { 105 int HttpNetworkLayer::CreateTransaction(scoped_ptr<HttpTransaction>* trans,
106 HttpTransactionDelegate* delegat) {
willchan no longer on Chromium 2012/07/26 01:39:37 delegate
tburkard 2012/07/26 02:10:40 Done.
106 if (suspended_) 107 if (suspended_)
107 return ERR_NETWORK_IO_SUSPENDED; 108 return ERR_NETWORK_IO_SUSPENDED;
108 109
109 trans->reset(new HttpNetworkTransaction(GetSession())); 110 trans->reset(new HttpNetworkTransaction(GetSession()));
110 return OK; 111 return OK;
111 } 112 }
112 113
113 HttpCache* HttpNetworkLayer::GetCache() { 114 HttpCache* HttpNetworkLayer::GetCache() {
114 return NULL; 115 return NULL;
115 } 116 }
116 117
117 HttpNetworkSession* HttpNetworkLayer::GetSession() { 118 HttpNetworkSession* HttpNetworkLayer::GetSession() {
118 return session_; 119 return session_;
119 } 120 }
120 121
121 void HttpNetworkLayer::OnSuspend() { 122 void HttpNetworkLayer::OnSuspend() {
122 suspended_ = true; 123 suspended_ = true;
123 124
124 if (session_) 125 if (session_)
125 session_->CloseIdleConnections(); 126 session_->CloseIdleConnections();
126 } 127 }
127 128
128 void HttpNetworkLayer::OnResume() { 129 void HttpNetworkLayer::OnResume() {
129 suspended_ = false; 130 suspended_ = false;
130 } 131 }
131 132
132 } // namespace net 133 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698