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

Side by Side Diff: content/browser/loader/loader_test_service_context.cc

Issue 1461283002: [DO NOT COMMIT] mojo datapipe performance measurement Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "content/browser/loader/loader_test_service_context.h"
6
7 #include <algorithm>
8
9 #include "base/logging.h"
10
11 namespace content {
12
13 LoaderTestServiceContext::LoaderTestServiceContext() = default;
14 LoaderTestServiceContext::~LoaderTestServiceContext() = default;
15
16 void LoaderTestServiceContext::CreateService(
17 mojo::InterfaceRequest<LoaderTestService> request) {
18 fprintf(stderr, "%s\n", __PRETTY_FUNCTION__);
19 scoped_ptr<LoaderTestServiceImpl> service(
20 new LoaderTestServiceImpl(std::move(request), this));
21 services_.push_back(std::move(service));
22 }
23
24 void LoaderTestServiceContext::ServiceHadConnectionError(
25 LoaderTestService* service) {
26 auto it = std::find_if(services_.begin(), services_.end(),
27 [service](const scoped_ptr<LoaderTestServiceImpl>& x) {
28 return x.get() == service;
29 });
30 DCHECK(it != services_.end());
31 services_.erase(it);
32 }
33
34 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/loader_test_service_context.h ('k') | content/browser/loader/loader_test_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698