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

Side by Side Diff: content/public/browser/provision_fetcher_impl.cc

Issue 2469863010: Move all ProvisionFetcher classes out of android/ subdirectories. (Closed)
Patch Set: Another NON_EXPORTED_BASE. Created 4 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
« no previous file with comments | « content/public/browser/provision_fetcher_impl.h ('k') | media/base/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser/media/android/provision_fetcher_impl.h" 5 #include "content/public/browser/provision_fetcher_impl.h"
6 6
7 #include "content/public/browser/android/provision_fetcher_factory.h" 7 #include "content/public/browser/provision_fetcher_factory.h"
8 #include "content/public/browser/browser_context.h"
9 #include "content/public/browser/render_frame_host.h"
10 #include "content/public/browser/render_process_host.h"
11 #include "content/public/browser/storage_partition.h"
12 #include "mojo/public/cpp/bindings/strong_binding.h" 8 #include "mojo/public/cpp/bindings/strong_binding.h"
13 #include "net/url_request/url_request_context_getter.h" 9 #include "net/url_request/url_request_context_getter.h"
14 10
15 namespace content { 11 namespace content {
16 12
17 // static 13 // static
18 void ProvisionFetcherImpl::Create( 14 void ProvisionFetcherImpl::Create(
19 RenderFrameHost* render_frame_host, 15 net::URLRequestContextGetter* context_getter,
20 media::mojom::ProvisionFetcherRequest request) { 16 media::mojom::ProvisionFetcherRequest request) {
21 net::URLRequestContextGetter* context_getter =
22 BrowserContext::GetDefaultStoragePartition(
23 render_frame_host->GetProcess()->GetBrowserContext())->
24 GetURLRequestContext();
25 DCHECK(context_getter); 17 DCHECK(context_getter);
26 mojo::MakeStrongBinding(base::MakeUnique<ProvisionFetcherImpl>( 18 mojo::MakeStrongBinding(base::MakeUnique<ProvisionFetcherImpl>(
27 CreateProvisionFetcher(context_getter)), 19 CreateProvisionFetcher(context_getter)),
28 std::move(request)); 20 std::move(request));
29 } 21 }
30 22
31 ProvisionFetcherImpl::ProvisionFetcherImpl( 23 ProvisionFetcherImpl::ProvisionFetcherImpl(
32 std::unique_ptr<media::ProvisionFetcher> provision_fetcher) 24 std::unique_ptr<media::ProvisionFetcher> provision_fetcher)
33 : provision_fetcher_(std::move(provision_fetcher)), weak_factory_(this) { 25 : provision_fetcher_(std::move(provision_fetcher)), weak_factory_(this) {
34 DVLOG(1) << __FUNCTION__; 26 DVLOG(1) << __FUNCTION__;
(...skipping 12 matching lines...) Expand all
47 } 39 }
48 40
49 void ProvisionFetcherImpl::OnResponse(const RetrieveCallback& callback, 41 void ProvisionFetcherImpl::OnResponse(const RetrieveCallback& callback,
50 bool success, 42 bool success,
51 const std::string& response) { 43 const std::string& response) {
52 DVLOG(1) << __FUNCTION__ << ": " << success; 44 DVLOG(1) << __FUNCTION__ << ": " << success;
53 callback.Run(success, response); 45 callback.Run(success, response);
54 } 46 }
55 47
56 } // namespace content 48 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/provision_fetcher_impl.h ('k') | media/base/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698