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

Side by Side Diff: chrome/browser/chrome_net_benchmarking_message_filter.cc

Issue 25977005: [SPDY] Do not advertise SPDY/2 by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 2 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 | chrome/browser/io_thread.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) 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 "chrome/browser/chrome_net_benchmarking_message_filter.h" 5 #include "chrome/browser/chrome_net_benchmarking_message_filter.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // TODO(lzheng): This only enables spdy over ssl. Enable spdy for http 105 // TODO(lzheng): This only enables spdy over ssl. Enable spdy for http
106 // when needed. 106 // when needed.
107 void ChromeNetBenchmarkingMessageFilter::OnEnableSpdy(bool enable) { 107 void ChromeNetBenchmarkingMessageFilter::OnEnableSpdy(bool enable) {
108 // This function is disabled unless the user has enabled 108 // This function is disabled unless the user has enabled
109 // benchmarking extensions. 109 // benchmarking extensions.
110 if (!CheckBenchmarkingEnabled()) { 110 if (!CheckBenchmarkingEnabled()) {
111 NOTREACHED() << "Received unexpected benchmarking IPC"; 111 NOTREACHED() << "Received unexpected benchmarking IPC";
112 return; 112 return;
113 } 113 }
114 if (enable) { 114 if (enable) {
115 net::HttpStreamFactory::EnableNpnSpdy(); 115 net::HttpStreamFactory::EnableNpnSpdy3();
116 net::HttpNetworkLayer::ForceAlternateProtocol(); 116 net::HttpNetworkLayer::ForceAlternateProtocol();
117 } else { 117 } else {
118 net::HttpStreamFactory::EnableNpnHttpOnly(); 118 net::HttpStreamFactory::EnableNpnHttpOnly();
119 } 119 }
120 } 120 }
121 121
122 void ChromeNetBenchmarkingMessageFilter::OnCloseCurrentConnections() { 122 void ChromeNetBenchmarkingMessageFilter::OnCloseCurrentConnections() {
123 // This function is disabled unless the user has enabled 123 // This function is disabled unless the user has enabled
124 // benchmarking extensions. 124 // benchmarking extensions.
125 if (!CheckBenchmarkingEnabled()) { 125 if (!CheckBenchmarkingEnabled()) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 static bool checked = false; 161 static bool checked = false;
162 static bool result = false; 162 static bool result = false;
163 if (!checked) { 163 if (!checked) {
164 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 164 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
165 result = command_line.HasSwitch(switches::kEnableNetBenchmarking); 165 result = command_line.HasSwitch(switches::kEnableNetBenchmarking);
166 checked = true; 166 checked = true;
167 } 167 }
168 return result; 168 return result;
169 } 169 }
170 170
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/io_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698