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

Side by Side Diff: content/browser/media/android/provision_fetcher_impl.cc

Issue 1878153002: Revert of Simplify BrowserContext by removing redundant methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/browser/media/android/provision_fetcher_impl.h" 5 #include "content/browser/media/android/provision_fetcher_impl.h"
6 6
7 #include "content/public/browser/android/provision_fetcher_factory.h" 7 #include "content/public/browser/android/provision_fetcher_factory.h"
8 #include "content/public/browser/browser_context.h" 8 #include "content/public/browser/browser_context.h"
9 #include "content/public/browser/render_frame_host.h" 9 #include "content/public/browser/render_frame_host.h"
10 #include "content/public/browser/render_process_host.h" 10 #include "content/public/browser/render_process_host.h"
11 #include "content/public/browser/storage_partition.h"
12 #include "net/url_request/url_request_context_getter.h" 11 #include "net/url_request/url_request_context_getter.h"
13 12
14 namespace content { 13 namespace content {
15 14
16 // static 15 // static
17 void ProvisionFetcherImpl::Create( 16 void ProvisionFetcherImpl::Create(
18 RenderFrameHost* render_frame_host, 17 RenderFrameHost* render_frame_host,
19 mojo::InterfaceRequest<media::interfaces::ProvisionFetcher> request) { 18 mojo::InterfaceRequest<media::interfaces::ProvisionFetcher> request) {
20 net::URLRequestContextGetter* context_getter = 19 net::URLRequestContextGetter* context_getter =
21 BrowserContext::GetDefaultStoragePartition( 20 render_frame_host->GetProcess()->GetBrowserContext()->GetRequestContext();
22 render_frame_host->GetProcess()->GetBrowserContext())->
23 GetURLRequestContext();
24 DCHECK(context_getter); 21 DCHECK(context_getter);
25 22
26 // The created object is strongly bound to (and owned by) the pipe. 23 // The created object is strongly bound to (and owned by) the pipe.
27 new ProvisionFetcherImpl(CreateProvisionFetcher(context_getter), 24 new ProvisionFetcherImpl(CreateProvisionFetcher(context_getter),
28 std::move(request)); 25 std::move(request));
29 } 26 }
30 27
31 ProvisionFetcherImpl::ProvisionFetcherImpl( 28 ProvisionFetcherImpl::ProvisionFetcherImpl(
32 std::unique_ptr<media::ProvisionFetcher> provision_fetcher, 29 std::unique_ptr<media::ProvisionFetcher> provision_fetcher,
33 mojo::InterfaceRequest<ProvisionFetcher> request) 30 mojo::InterfaceRequest<ProvisionFetcher> request)
(...skipping 16 matching lines...) Expand all
50 } 47 }
51 48
52 void ProvisionFetcherImpl::OnResponse(const RetrieveCallback& callback, 49 void ProvisionFetcherImpl::OnResponse(const RetrieveCallback& callback,
53 bool success, 50 bool success,
54 const std::string& response) { 51 const std::string& response) {
55 DVLOG(1) << __FUNCTION__ << ": " << success; 52 DVLOG(1) << __FUNCTION__ << ": " << success;
56 callback.Run(success, response); 53 callback.Run(success, response);
57 } 54 }
58 55
59 } // namespace content 56 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/android/media_resource_getter_impl.cc ('k') | content/browser/media/cdm/browser_cdm_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698