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

Unified Diff: mojo/services/network/network_context.cc

Issue 1841863002: Update monet. (Closed) Base URL: https://github.com/domokit/monet.git@master
Patch Set: Created 4 years, 9 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 | « mojo/services/network/interfaces/web_socket.mojom ('k') | mojo/services/network/network_service_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/network/network_context.cc
diff --git a/mojo/services/network/network_context.cc b/mojo/services/network/network_context.cc
index c674fa28f236e4ebc17a58407f6615cbcfa2bc66..305bcfe2a42196a88cf60b1f66e433f617f4ff20 100644
--- a/mojo/services/network/network_context.cc
+++ b/mojo/services/network/network_context.cc
@@ -12,7 +12,6 @@
#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/path_service.h"
-#include "mojo/common/user_agent.h"
#include "mojo/services/network/url_loader_impl.h"
#include "net/log/net_log_util.h"
#include "net/log/write_to_file_net_log_observer.h"
@@ -23,14 +22,22 @@
namespace mojo {
namespace {
+
// Logs network information to the specified file.
const char kLogNetLog[] = "log-net-log";
base::FilePath GetCacheDirectory(const base::FilePath& base_path) {
return base_path.Append(FILE_PATH_LITERAL("Cache"));
}
+
+std::string GetUserAgent() {
+ // TODO(vtl): Haha, very funny.
+ return "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like "
+ "Gecko) Chrome/42.0.2311.68 Safari/537.36";
}
+} // namespace
+
class NetworkContext::MojoNetLog : public net::NetLog {
public:
MojoNetLog() {
@@ -141,7 +148,7 @@ scoped_ptr<net::URLRequestContext> NetworkContext::MakeURLRequestContext(
const base::FilePath& base_path) {
net::URLRequestContextBuilder builder;
builder.set_accept_language("en-us,en");
- builder.set_user_agent(mojo::common::GetUserAgent());
+ builder.set_user_agent(GetUserAgent());
builder.set_proxy_service(net::ProxyService::CreateDirect());
builder.set_transport_security_persister_path(base_path);
builder.set_data_enabled(true);
« no previous file with comments | « mojo/services/network/interfaces/web_socket.mojom ('k') | mojo/services/network/network_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698