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

Side by Side Diff: mojo/services/network/network_service_delegate.cc

Issue 1459453003: mandoline: write this after lunch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add TracingImpls to mus and mash, fix naming. Created 5 years, 1 month 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "mojo/services/network/network_service_delegate.h" 5 #include "mojo/services/network/network_service_delegate.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/base_paths.h" 8 #include "base/base_paths.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 } else { 122 } else {
123 CHECK(PathService::Get(base::DIR_TEMP, &base_path)); 123 CHECK(PathService::Get(base::DIR_TEMP, &base_path));
124 base_path = base_path.Append(FILE_PATH_LITERAL("network_service")); 124 base_path = base_path.Append(FILE_PATH_LITERAL("network_service"));
125 } 125 }
126 126
127 scoped_refptr<base::SequencedTaskRunner> worker_thread; 127 scoped_refptr<base::SequencedTaskRunner> worker_thread;
128 #if !defined(OS_ANDROID) 128 #if !defined(OS_ANDROID)
129 worker_thread = io_worker_thread_->task_runner(); 129 worker_thread = io_worker_thread_->task_runner();
130 #endif 130 #endif
131 context_.reset(new NetworkContext(base_path, worker_thread, this)); 131 context_.reset(new NetworkContext(base_path, worker_thread, this));
132 tracing_.Initialize(app);
132 } 133 }
133 134
134 bool NetworkServiceDelegate::ConfigureIncomingConnection( 135 bool NetworkServiceDelegate::ConfigureIncomingConnection(
135 ApplicationConnection* connection) { 136 ApplicationConnection* connection) {
136 DCHECK(context_); 137 DCHECK(context_);
137 connection->AddService<CookieStore>(this); 138 connection->AddService<CookieStore>(this);
138 connection->AddService<NetworkService>(this); 139 connection->AddService<NetworkService>(this);
139 connection->AddService<URLLoaderFactory>(this); 140 connection->AddService<URLLoaderFactory>(this);
140 connection->AddService<WebSocketFactory>(this); 141 connection->AddService<WebSocketFactory>(this);
141 return true; 142 return true;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 FOR_EACH_OBSERVER(NetworkServiceDelegateObserver, observers_, 198 FOR_EACH_OBSERVER(NetworkServiceDelegateObserver, observers_,
198 OnIOWorkerThreadShutdown()); 199 OnIOWorkerThreadShutdown());
199 200
200 // Destroy the io worker thread here so that we can commit any pending 201 // Destroy the io worker thread here so that we can commit any pending
201 // cookies here. 202 // cookies here.
202 io_worker_thread_.reset(); 203 io_worker_thread_.reset();
203 } 204 }
204 } 205 }
205 206
206 } // namespace mojo 207 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/network/network_service_delegate.h ('k') | mojo/services/tracing/public/cpp/tracing_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698