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

Side by Side Diff: services/data_decoder/data_decoder_service.cc

Issue 2851173004: Eliminate bind callback that doesn't take a BindSourceInfo parameter. (Closed)
Patch Set: . Created 3 years, 7 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "services/data_decoder/data_decoder_service.h" 5 #include "services/data_decoder/data_decoder_service.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "mojo/public/cpp/bindings/strong_binding.h" 11 #include "mojo/public/cpp/bindings/strong_binding.h"
12 #include "services/data_decoder/image_decoder_impl.h" 12 #include "services/data_decoder/image_decoder_impl.h"
13 #include "services/data_decoder/public/interfaces/image_decoder.mojom.h" 13 #include "services/data_decoder/public/interfaces/image_decoder.mojom.h"
14 #include "services/service_manager/public/cpp/service_context.h" 14 #include "services/service_manager/public/cpp/service_context.h"
15 15
16 namespace data_decoder { 16 namespace data_decoder {
17 17
18 namespace { 18 namespace {
19 19
20 void OnImageDecoderRequest( 20 void OnImageDecoderRequest(
21 service_manager::ServiceContextRefFactory* ref_factory, 21 service_manager::ServiceContextRefFactory* ref_factory,
22 const service_manager::BindSourceInfo& source_info,
22 mojom::ImageDecoderRequest request) { 23 mojom::ImageDecoderRequest request) {
23 mojo::MakeStrongBinding( 24 mojo::MakeStrongBinding(
24 base::MakeUnique<ImageDecoderImpl>(ref_factory->CreateRef()), 25 base::MakeUnique<ImageDecoderImpl>(ref_factory->CreateRef()),
25 std::move(request)); 26 std::move(request));
26 } 27 }
27 28
28 } // namespace 29 } // namespace
29 30
30 DataDecoderService::DataDecoderService() : weak_factory_(this) {} 31 DataDecoderService::DataDecoderService() : weak_factory_(this) {}
31 32
(...skipping 27 matching lines...) Expand all
59 base::TimeDelta::FromSeconds(5)); 60 base::TimeDelta::FromSeconds(5));
60 } 61 }
61 62
62 void DataDecoderService::MaybeRequestQuit() { 63 void DataDecoderService::MaybeRequestQuit() {
63 DCHECK(ref_factory_); 64 DCHECK(ref_factory_);
64 if (ref_factory_->HasNoRefs()) 65 if (ref_factory_->HasNoRefs())
65 context()->RequestQuit(); 66 context()->RequestQuit();
66 } 67 }
67 68
68 } // namespace data_decoder 69 } // namespace data_decoder
OLDNEW
« no previous file with comments | « extensions/utility/utility_handler.cc ('k') | services/resource_coordinator/memory/coordinator/coordinator_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698