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

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

Issue 1864583006: Simplify BrowserContext by removing redundant methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix 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"
11 #include "net/url_request/url_request_context_getter.h" 12 #include "net/url_request/url_request_context_getter.h"
12 13
13 namespace content { 14 namespace content {
14 15
15 // static 16 // static
16 void ProvisionFetcherImpl::Create( 17 void ProvisionFetcherImpl::Create(
17 RenderFrameHost* render_frame_host, 18 RenderFrameHost* render_frame_host,
18 mojo::InterfaceRequest<media::interfaces::ProvisionFetcher> request) { 19 mojo::InterfaceRequest<media::interfaces::ProvisionFetcher> request) {
19 net::URLRequestContextGetter* context_getter = 20 net::URLRequestContextGetter* context_getter =
20 render_frame_host->GetProcess()->GetBrowserContext()->GetRequestContext(); 21 BrowserContext::GetDefaultStoragePartition(
22 render_frame_host->GetProcess()->GetBrowserContext())->
23 GetURLRequestContext();
21 DCHECK(context_getter); 24 DCHECK(context_getter);
22 25
23 // The created object is strongly bound to (and owned by) the pipe. 26 // The created object is strongly bound to (and owned by) the pipe.
24 new ProvisionFetcherImpl(CreateProvisionFetcher(context_getter), 27 new ProvisionFetcherImpl(CreateProvisionFetcher(context_getter),
25 std::move(request)); 28 std::move(request));
26 } 29 }
27 30
28 ProvisionFetcherImpl::ProvisionFetcherImpl( 31 ProvisionFetcherImpl::ProvisionFetcherImpl(
29 std::unique_ptr<media::ProvisionFetcher> provision_fetcher, 32 std::unique_ptr<media::ProvisionFetcher> provision_fetcher,
30 mojo::InterfaceRequest<ProvisionFetcher> request) 33 mojo::InterfaceRequest<ProvisionFetcher> request)
(...skipping 16 matching lines...) Expand all
47 } 50 }
48 51
49 void ProvisionFetcherImpl::OnResponse(const RetrieveCallback& callback, 52 void ProvisionFetcherImpl::OnResponse(const RetrieveCallback& callback,
50 bool success, 53 bool success,
51 const std::string& response) { 54 const std::string& response) {
52 DVLOG(1) << __FUNCTION__ << ": " << success; 55 DVLOG(1) << __FUNCTION__ << ": " << success;
53 callback.Run(success, response); 56 callback.Run(success, response);
54 } 57 }
55 58
56 } // namespace content 59 } // 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