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

Unified Diff: chrome/renderer/loadtimes_extension_bindings.cc

Issue 2347163002: s/NPN/ALPN/ (Closed)
Patch Set: Re: #12. Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/cronet/android/cronet_url_request_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/loadtimes_extension_bindings.cc
diff --git a/chrome/renderer/loadtimes_extension_bindings.cc b/chrome/renderer/loadtimes_extension_bindings.cc
index 2b6259556a67358e8aeeaa3a2cbffbc51cc8b073..12f64be342135e37d437dddb0caa2f1d6b43ec0d 100644
--- a/chrome/renderer/loadtimes_extension_bindings.cc
+++ b/chrome/renderer/loadtimes_extension_bindings.cc
@@ -168,9 +168,9 @@ class LoadTimesExtensionWrapper : public v8::Extension {
std::string navigation_type =
GetNavigationType(data_source->navigationType());
bool was_fetched_via_spdy = document_state->was_fetched_via_spdy();
- bool was_npn_negotiated = document_state->was_npn_negotiated();
- std::string npn_negotiated_protocol =
- document_state->npn_negotiated_protocol();
+ bool was_alpn_negotiated = document_state->was_alpn_negotiated();
+ std::string alpn_negotiated_protocol =
+ document_state->alpn_negotiated_protocol();
bool was_alternate_protocol_available =
document_state->was_alternate_protocol_available();
std::string connection_info = net::HttpResponseInfo::ConnectionInfoToString(
@@ -284,28 +284,27 @@ class LoadTimesExtensionWrapper : public v8::Extension {
.FromMaybe(false)) {
return;
}
- if (!load_times->SetAccessor(
- ctx,
- v8::String::NewFromUtf8(
- isolate, "wasNpnNegotiated", v8::NewStringType::kNormal)
- .ToLocalChecked(),
- LoadtimesGetter,
- nullptr,
- v8::Boolean::New(isolate, was_npn_negotiated))
- .FromMaybe(false)) {
+ if (!load_times
+ ->SetAccessor(ctx,
+ v8::String::NewFromUtf8(isolate, "wasNpnNegotiated",
+ v8::NewStringType::kNormal)
+ .ToLocalChecked(),
+ LoadtimesGetter, nullptr,
+ v8::Boolean::New(isolate, was_alpn_negotiated))
+ .FromMaybe(false)) {
return;
}
- if (!load_times->SetAccessor(
- ctx,
- v8::String::NewFromUtf8(
- isolate, "npnNegotiatedProtocol", v8::NewStringType::kNormal)
- .ToLocalChecked(),
- LoadtimesGetter,
- nullptr,
- v8::String::NewFromUtf8(isolate, npn_negotiated_protocol.c_str(),
- v8::NewStringType::kNormal)
- .ToLocalChecked())
- .FromMaybe(false)) {
+ if (!load_times
+ ->SetAccessor(
+ ctx, v8::String::NewFromUtf8(isolate, "npnNegotiatedProtocol",
+ v8::NewStringType::kNormal)
+ .ToLocalChecked(),
+ LoadtimesGetter, nullptr,
+ v8::String::NewFromUtf8(isolate,
+ alpn_negotiated_protocol.c_str(),
+ v8::NewStringType::kNormal)
+ .ToLocalChecked())
+ .FromMaybe(false)) {
return;
}
if (!load_times->SetAccessor(
« no previous file with comments | « no previous file | components/cronet/android/cronet_url_request_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698