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

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

Issue 2808010: Add field trial stats for alternate_protocol. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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
« no previous file with comments | « chrome/common/render_messages.h ('k') | chrome/renderer/navigation_state.h » ('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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 "chrome/renderer/navigation_state.h" 10 #include "chrome/renderer/navigation_state.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 navigation_state->first_paint_after_load_time().ToDoubleT())); 127 navigation_state->first_paint_after_load_time().ToDoubleT()));
128 load_times->Set( 128 load_times->Set(
129 v8::String::New("navigationType"), 129 v8::String::New("navigationType"),
130 v8::String::New(GetNavigationType(data_source->navigationType()))); 130 v8::String::New(GetNavigationType(data_source->navigationType())));
131 load_times->Set( 131 load_times->Set(
132 v8::String::New("wasFetchedViaSpdy"), 132 v8::String::New("wasFetchedViaSpdy"),
133 v8::Boolean::New(navigation_state->was_fetched_via_spdy())); 133 v8::Boolean::New(navigation_state->was_fetched_via_spdy()));
134 load_times->Set( 134 load_times->Set(
135 v8::String::New("wasNpnNegotiated"), 135 v8::String::New("wasNpnNegotiated"),
136 v8::Boolean::New(navigation_state->was_npn_negotiated())); 136 v8::Boolean::New(navigation_state->was_npn_negotiated()));
137 load_times->Set(
138 v8::String::New("wasAlternateProtocolAvailable"),
139 v8::Boolean::New(
140 navigation_state->was_alternate_protocol_available()));
137 return load_times; 141 return load_times;
138 } 142 }
139 } 143 }
140 return v8::Null(); 144 return v8::Null();
141 } 145 }
142 146
143 static v8::Handle<v8::Value> GetCSI(const v8::Arguments& args) { 147 static v8::Handle<v8::Value> GetCSI(const v8::Arguments& args) {
144 WebFrame* frame = WebFrame::frameForCurrentContext(); 148 WebFrame* frame = WebFrame::frameForCurrentContext();
145 if (frame) { 149 if (frame) {
146 WebDataSource* data_source = frame->dataSource(); 150 WebDataSource* data_source = frame->dataSource();
(...skipping 26 matching lines...) Expand all
173 } 177 }
174 return v8::Null(); 178 return v8::Null();
175 } 179 }
176 }; 180 };
177 181
178 v8::Extension* LoadTimesExtension::Get() { 182 v8::Extension* LoadTimesExtension::Get() {
179 return new LoadTimesExtensionWrapper(); 183 return new LoadTimesExtensionWrapper();
180 } 184 }
181 185
182 } // namespace extensions_v8 186 } // namespace extensions_v8
OLDNEW
« no previous file with comments | « chrome/common/render_messages.h ('k') | chrome/renderer/navigation_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698