Commit 717f0703 authored by Eric Roman's avatar Eric Roman Committed by Commit Bot

Don't create CastNetLog when using Network Service.

This fixes support for --log-net-log when the Network Service is enabled.

Bug: 979838
Change-Id: I86f25ce87584e2f318ddaa99012c876974c85745
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1682887
Commit-Queue: Eric Roman <eroman@chromium.org>
Reviewed-by: default avatarLuke Halliwell <halliwell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#677088}
parent a85c7f4f
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
#include "gpu/command_buffer/service/gpu_switches.h" #include "gpu/command_buffer/service/gpu_switches.h"
#include "media/base/media.h" #include "media/base/media.h"
#include "media/base/media_switches.h" #include "media/base/media_switches.h"
#include "services/network/public/cpp/features.h"
#include "services/network/public/cpp/shared_url_loader_factory.h" #include "services/network/public/cpp/shared_url_loader_factory.h"
#include "ui/base/ui_base_switches.h" #include "ui/base/ui_base_switches.h"
#include "ui/gl/gl_switches.h" #include "ui/gl/gl_switches.h"
...@@ -358,7 +359,9 @@ CastBrowserMainParts::CastBrowserMainParts( ...@@ -358,7 +359,9 @@ CastBrowserMainParts::CastBrowserMainParts(
parameters_(parameters), parameters_(parameters),
cast_content_browser_client_(cast_content_browser_client), cast_content_browser_client_(cast_content_browser_client),
url_request_context_factory_(url_request_context_factory), url_request_context_factory_(url_request_context_factory),
net_log_(new CastNetLog()), net_log_(!base::FeatureList::IsEnabled(network::features::kNetworkService)
? new CastNetLog()
: nullptr),
media_caps_(new media::MediaCapsImpl()) { media_caps_(new media::MediaCapsImpl()) {
DCHECK(cast_content_browser_client); DCHECK(cast_content_browser_client);
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
......
...@@ -17,6 +17,8 @@ class FileNetLogObserver; ...@@ -17,6 +17,8 @@ class FileNetLogObserver;
namespace chromecast { namespace chromecast {
// TODO(http://crbug.com/904910): Delete this once full switched over to Network
// Service.
class CastNetLog : public net::NetLog { class CastNetLog : public net::NetLog {
public: public:
CastNetLog(); CastNetLog();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment