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

Side by Side Diff: chrome/browser/profiles/off_the_record_profile_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/profiles/off_the_record_profile_impl.h" 5 #include "chrome/browser/profiles/off_the_record_profile_impl.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 307
308 PrefService* OffTheRecordProfileImpl::GetOffTheRecordPrefs() { 308 PrefService* OffTheRecordProfileImpl::GetOffTheRecordPrefs() {
309 return prefs_; 309 return prefs_;
310 } 310 }
311 311
312 DownloadManagerDelegate* OffTheRecordProfileImpl::GetDownloadManagerDelegate() { 312 DownloadManagerDelegate* OffTheRecordProfileImpl::GetDownloadManagerDelegate() {
313 return DownloadServiceFactory::GetForBrowserContext(this)-> 313 return DownloadServiceFactory::GetForBrowserContext(this)->
314 GetDownloadManagerDelegate(); 314 GetDownloadManagerDelegate();
315 } 315 }
316 316
317 net::URLRequestContextGetter* OffTheRecordProfileImpl::GetRequestContext() {
318 return GetDefaultStoragePartition(this)->GetURLRequestContext();
319 }
320
321 net::URLRequestContextGetter* OffTheRecordProfileImpl::CreateRequestContext( 317 net::URLRequestContextGetter* OffTheRecordProfileImpl::CreateRequestContext(
322 content::ProtocolHandlerMap* protocol_handlers, 318 content::ProtocolHandlerMap* protocol_handlers,
323 content::URLRequestInterceptorScopedVector request_interceptors) { 319 content::URLRequestInterceptorScopedVector request_interceptors) {
324 return io_data_->CreateMainRequestContextGetter( 320 return io_data_->CreateMainRequestContextGetter(
325 protocol_handlers, std::move(request_interceptors)) 321 protocol_handlers, std::move(request_interceptors))
326 .get(); 322 .get();
327 } 323 }
328 324
329 net::URLRequestContextGetter* 325 net::URLRequestContextGetter*
330 OffTheRecordProfileImpl::GetMediaRequestContext() { 326 OffTheRecordProfileImpl::GetMediaRequestContext() {
(...skipping 10 matching lines...) Expand all
341 } 337 }
342 338
343 net::URLRequestContextGetter* 339 net::URLRequestContextGetter*
344 OffTheRecordProfileImpl::GetMediaRequestContextForStoragePartition( 340 OffTheRecordProfileImpl::GetMediaRequestContextForStoragePartition(
345 const base::FilePath& partition_path, 341 const base::FilePath& partition_path,
346 bool in_memory) { 342 bool in_memory) {
347 return io_data_->GetIsolatedAppRequestContextGetter(partition_path, in_memory) 343 return io_data_->GetIsolatedAppRequestContextGetter(partition_path, in_memory)
348 .get(); 344 .get();
349 } 345 }
350 346
347 net::URLRequestContextGetter* OffTheRecordProfileImpl::GetRequestContext() {
348 return GetDefaultStoragePartition(this)->GetURLRequestContext();
349 }
350
351 net::URLRequestContextGetter* 351 net::URLRequestContextGetter*
352 OffTheRecordProfileImpl::GetRequestContextForExtensions() { 352 OffTheRecordProfileImpl::GetRequestContextForExtensions() {
353 return io_data_->GetExtensionsRequestContextGetter().get(); 353 return io_data_->GetExtensionsRequestContextGetter().get();
354 } 354 }
355 355
356 net::URLRequestContextGetter* 356 net::URLRequestContextGetter*
357 OffTheRecordProfileImpl::CreateRequestContextForStoragePartition( 357 OffTheRecordProfileImpl::CreateRequestContextForStoragePartition(
358 const base::FilePath& partition_path, 358 const base::FilePath& partition_path,
359 bool in_memory, 359 bool in_memory,
360 content::ProtocolHandlerMap* protocol_handlers, 360 content::ProtocolHandlerMap* protocol_handlers,
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { 561 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() {
562 #if defined(OS_CHROMEOS) 562 #if defined(OS_CHROMEOS)
563 if (chromeos::ProfileHelper::IsSigninProfile(this)) { 563 if (chromeos::ProfileHelper::IsSigninProfile(this)) {
564 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( 564 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
565 g_browser_process->local_state()); 565 g_browser_process->local_state());
566 } 566 }
567 #endif // defined(OS_CHROMEOS) 567 #endif // defined(OS_CHROMEOS)
568 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( 568 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
569 GetPrefs(), g_browser_process->local_state()); 569 GetPrefs(), g_browser_process->local_state());
570 } 570 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_impl.h ('k') | chrome/browser/profiles/profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698