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

Side by Side Diff: content/public/browser/provision_fetcher_impl.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 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 "content/public/browser/provision_fetcher_impl.h" 5 #include "content/public/browser/provision_fetcher_impl.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "content/public/browser/provision_fetcher_factory.h" 8 #include "content/public/browser/provision_fetcher_factory.h"
9 #include "mojo/public/cpp/bindings/strong_binding.h" 9 #include "mojo/public/cpp/bindings/strong_binding.h"
10 #include "net/url_request/url_request_context_getter.h" 10 #include "net/url_request/url_request_context_getter.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 // static 14 // static
15 void ProvisionFetcherImpl::Create( 15 void ProvisionFetcherImpl::Create(
16 net::URLRequestContextGetter* context_getter, 16 net::URLRequestContextGetter* context_getter,
17 const service_manager::BindSourceInfo& source_info,
17 media::mojom::ProvisionFetcherRequest request) { 18 media::mojom::ProvisionFetcherRequest request) {
18 DCHECK(context_getter); 19 DCHECK(context_getter);
19 mojo::MakeStrongBinding(base::MakeUnique<ProvisionFetcherImpl>( 20 mojo::MakeStrongBinding(base::MakeUnique<ProvisionFetcherImpl>(
20 CreateProvisionFetcher(context_getter)), 21 CreateProvisionFetcher(context_getter)),
21 std::move(request)); 22 std::move(request));
22 } 23 }
23 24
24 ProvisionFetcherImpl::ProvisionFetcherImpl( 25 ProvisionFetcherImpl::ProvisionFetcherImpl(
25 std::unique_ptr<media::ProvisionFetcher> provision_fetcher) 26 std::unique_ptr<media::ProvisionFetcher> provision_fetcher)
26 : provision_fetcher_(std::move(provision_fetcher)), weak_factory_(this) { 27 : provision_fetcher_(std::move(provision_fetcher)), weak_factory_(this) {
(...skipping 13 matching lines...) Expand all
40 } 41 }
41 42
42 void ProvisionFetcherImpl::OnResponse(const RetrieveCallback& callback, 43 void ProvisionFetcherImpl::OnResponse(const RetrieveCallback& callback,
43 bool success, 44 bool success,
44 const std::string& response) { 45 const std::string& response) {
45 DVLOG(1) << __FUNCTION__ << ": " << success; 46 DVLOG(1) << __FUNCTION__ << ": " << success;
46 callback.Run(success, response); 47 callback.Run(success, response);
47 } 48 }
48 49
49 } // namespace content 50 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/provision_fetcher_impl.h ('k') | content/renderer/image_downloader/image_downloader_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698