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

Side by Side Diff: chrome/renderer/loadtimes_extension_bindings.cc

Issue 9315021: In chrome:loadtimes show the NPN protocol negotiated (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 10 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
« no previous file with comments | « no previous file | content/browser/renderer_host/resource_dispatcher_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/renderer/loadtimes_extension_bindings.h" 5 #include "chrome/renderer/loadtimes_extension_bindings.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "content/public/renderer/document_state.h" 10 #include "content/public/renderer/document_state.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 document_state->first_paint_after_load_time().ToDoubleT())); 128 document_state->first_paint_after_load_time().ToDoubleT()));
129 load_times->Set( 129 load_times->Set(
130 v8::String::New("navigationType"), 130 v8::String::New("navigationType"),
131 v8::String::New(GetNavigationType(data_source->navigationType()))); 131 v8::String::New(GetNavigationType(data_source->navigationType())));
132 load_times->Set( 132 load_times->Set(
133 v8::String::New("wasFetchedViaSpdy"), 133 v8::String::New("wasFetchedViaSpdy"),
134 v8::Boolean::New(document_state->was_fetched_via_spdy())); 134 v8::Boolean::New(document_state->was_fetched_via_spdy()));
135 load_times->Set( 135 load_times->Set(
136 v8::String::New("wasNpnNegotiated"), 136 v8::String::New("wasNpnNegotiated"),
137 v8::Boolean::New(document_state->was_npn_negotiated())); 137 v8::Boolean::New(document_state->was_npn_negotiated()));
138 load_times->Set(
139 v8::String::New("npnNegotiatedProtocol"),
140 v8::String::New(document_state->npn_negotiated_protocol().c_str()));
138 load_times->Set( 141 load_times->Set(
139 v8::String::New("wasAlternateProtocolAvailable"), 142 v8::String::New("wasAlternateProtocolAvailable"),
140 v8::Boolean::New( 143 v8::Boolean::New(
141 document_state->was_alternate_protocol_available())); 144 document_state->was_alternate_protocol_available()));
142 return load_times; 145 return load_times;
143 } 146 }
144 } 147 }
145 return v8::Null(); 148 return v8::Null();
146 } 149 }
147 150
(...skipping 30 matching lines...) Expand all
178 } 181 }
179 return v8::Null(); 182 return v8::Null();
180 } 183 }
181 }; 184 };
182 185
183 v8::Extension* LoadTimesExtension::Get() { 186 v8::Extension* LoadTimesExtension::Get() {
184 return new LoadTimesExtensionWrapper(); 187 return new LoadTimesExtensionWrapper();
185 } 188 }
186 189
187 } // namespace extensions_v8 190 } // namespace extensions_v8
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/resource_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698