Commit 3c56ace4 authored by Xiangjun Zhang's avatar Xiangjun Zhang Committed by Commit Bot

Mirroring Service: Create network context as requested.

This CL adds implementation to create a network context through Network
Service for the Mirroring Service.

Bug: 734672
Change-Id: I26422b4f4f5c69bd8398dc3ae3d5ee501c996eea
Reviewed-on: https://chromium-review.googlesource.com/1139218Reviewed-by: default avatarYuri Wiitala <miu@chromium.org>
Reviewed-by: default avataroysteine <oysteine@chromium.org>
Commit-Queue: Xiangjun Zhang <xjz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577635}
parent b1b31c05
...@@ -189,6 +189,17 @@ const char* const kAllocatorDumpNameWhitelist[] = { ...@@ -189,6 +189,17 @@ const char* const kAllocatorDumpNameWhitelist[] = {
"net/url_request_context/main_media/0x?/http_cache/memory_backend", "net/url_request_context/main_media/0x?/http_cache/memory_backend",
"net/url_request_context/main_media/0x?/http_cache/simple_backend", "net/url_request_context/main_media/0x?/http_cache/simple_backend",
"net/url_request_context/main_media/0x?/http_network_session", "net/url_request_context/main_media/0x?/http_network_session",
"net/url_request_context/mirroring",
"net/url_request_context/mirroring/0x?",
"net/url_request_context/mirroring/0x?/cookie_monster",
"net/url_request_context/mirroring/0x?/cookie_monster/cookies",
"net/url_request_context/mirroring/0x?/cookie_monster/tasks_pending_global",
"net/url_request_context/mirroring/0x?/cookie_monster/"
"tasks_pending_for_key",
"net/url_request_context/mirroring/0x?/http_cache",
"net/url_request_context/mirroring/0x?/http_cache/memory_backend",
"net/url_request_context/mirroring/0x?/http_cache/simple_backend",
"net/url_request_context/mirroring/0x?/http_network_session",
"net/url_request_context/proxy", "net/url_request_context/proxy",
"net/url_request_context/proxy/0x?", "net/url_request_context/proxy/0x?",
"net/url_request_context/proxy/0x?/cookie_monster", "net/url_request_context/proxy/0x?/cookie_monster",
......
...@@ -9,8 +9,10 @@ ...@@ -9,8 +9,10 @@
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "base/single_thread_task_runner.h" #include "base/single_thread_task_runner.h"
#include "base/task_scheduler/post_task.h" #include "base/task_scheduler/post_task.h"
#include "chrome/browser/net/default_network_context_params.h"
#include "components/mirroring/browser/single_client_video_capture_host.h" #include "components/mirroring/browser/single_client_video_capture_host.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/browser/network_service_instance.h"
#include "content/public/browser/video_capture_device_launcher.h" #include "content/public/browser/video_capture_device_launcher.h"
#include "mojo/public/cpp/bindings/strong_binding.h" #include "mojo/public/cpp/bindings/strong_binding.h"
...@@ -86,7 +88,11 @@ void CastMirroringServiceHost::GetVideoCaptureHost( ...@@ -86,7 +88,11 @@ void CastMirroringServiceHost::GetVideoCaptureHost(
void CastMirroringServiceHost::GetNetworkContext( void CastMirroringServiceHost::GetNetworkContext(
network::mojom::NetworkContextRequest request) { network::mojom::NetworkContextRequest request) {
// TODO(xjz): Implemenation will be added in a later CL. network::mojom::NetworkContextParamsPtr network_context_params =
CreateDefaultNetworkContextParams();
network_context_params->context_name = "mirroring";
content::GetNetworkService()->CreateNetworkContext(
std::move(request), std::move(network_context_params));
} }
void CastMirroringServiceHost::CreateAudioStream( void CastMirroringServiceHost::CreateAudioStream(
......
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