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

Unified Diff: components/network_session_configurator/network_session_configurator.h

Issue 1892123003: Add components/network_session_configurator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add dependencies for iOS. Created 4 years, 8 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
Index: components/network_session_configurator/network_session_configurator.h
diff --git a/components/network_session_configurator/network_session_configurator.h b/components/network_session_configurator/network_session_configurator.h
new file mode 100644
index 0000000000000000000000000000000000000000..a0fddcc18fe2e5242e5390aff275036e7a4bccb4
--- /dev/null
+++ b/components/network_session_configurator/network_session_configurator.h
@@ -0,0 +1,38 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Helper functions to configure HttpNetworkSession::Params based on field
+// trials, policy, and command line.
+
+#ifndef COMPONENTS_NETWORK_SESSION_CONFIGURATOR_NETWORK_SESSION_CONFIGURATOR_H_
+#define COMPONENTS_NETWORK_SESSION_CONFIGURATOR_NETWORK_SESSION_CONFIGURATOR_H_
+
+#include <string>
+
+#include "base/command_line.h"
+#include "net/http/http_network_session.h"
+
+namespace network_session_configurator {
+
+// Configure |params| based on field trials and policy arguments.
+void ParseFieldTrials(bool is_spdy_allowed_by_policy,
+ bool is_quic_allowed_by_policy,
+ const std::string& quic_user_agent_id,
+ net::HttpNetworkSession::Params* params);
+
+// Configure |params| based on field trials, policy arguments,
+// and command line.
+void ParseFieldTrialsAndCommandLine(bool is_spdy_allowed_by_policy,
+ bool is_quic_allowed_by_policy,
+ const std::string& quic_user_agent_id,
+ net::HttpNetworkSession::Params* params);
+
+// Returns true if QUIC should be enabled for data reduction proxy, either
+// as a result of a field trial or a command line flag.
+bool ShouldEnableQuicForDataReductionProxy(
+ const base::CommandLine& command_line);
+
+} // namespace network_session_configurator
+
+#endif // COMPONENTS_NETWORK_SESSION_CONFIGURATOR_NETWORK_SESSION_CONFIGURATOR_H_
Ryan Hamilton 2016/04/21 21:15:25 It's too bad this name is so long.

Powered by Google App Engine
This is Rietveld 408576698