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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2976323002: Hook up ProfileIOData's URLRequestContext to a NetworkService. (Closed)
Patch Set: Add some docs to network_context.h Created 3 years, 5 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/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "chrome/browser/defaults.h" 46 #include "chrome/browser/defaults.h"
47 #include "chrome/browser/download/download_prefs.h" 47 #include "chrome/browser/download/download_prefs.h"
48 #include "chrome/browser/font_family_cache.h" 48 #include "chrome/browser/font_family_cache.h"
49 #include "chrome/browser/media/router/media_router_feature.h" 49 #include "chrome/browser/media/router/media_router_feature.h"
50 #include "chrome/browser/media/router/presentation_service_delegate_impl.h" 50 #include "chrome/browser/media/router/presentation_service_delegate_impl.h"
51 #include "chrome/browser/media/router/receiver_presentation_service_delegate_imp l.h" 51 #include "chrome/browser/media/router/receiver_presentation_service_delegate_imp l.h"
52 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" 52 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h"
53 #include "chrome/browser/memory/chrome_memory_coordinator_delegate.h" 53 #include "chrome/browser/memory/chrome_memory_coordinator_delegate.h"
54 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" 54 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h"
55 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" 55 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h"
56 #include "chrome/browser/net/profile_network_context_service.h"
57 #include "chrome/browser/net/profile_network_context_service_factory.h"
56 #include "chrome/browser/net_benchmarking.h" 58 #include "chrome/browser/net_benchmarking.h"
57 #include "chrome/browser/notifications/platform_notification_service_impl.h" 59 #include "chrome/browser/notifications/platform_notification_service_impl.h"
58 #include "chrome/browser/page_load_metrics/experiments/delay_navigation_throttle .h" 60 #include "chrome/browser/page_load_metrics/experiments/delay_navigation_throttle .h"
59 #include "chrome/browser/page_load_metrics/metrics_navigation_throttle.h" 61 #include "chrome/browser/page_load_metrics/metrics_navigation_throttle.h"
60 #include "chrome/browser/page_load_metrics/page_load_metrics_util.h" 62 #include "chrome/browser/page_load_metrics/page_load_metrics_util.h"
61 #include "chrome/browser/password_manager/chrome_password_manager_client.h" 63 #include "chrome/browser/password_manager/chrome_password_manager_client.h"
62 #include "chrome/browser/permissions/permission_context_base.h" 64 #include "chrome/browser/permissions/permission_context_base.h"
63 #include "chrome/browser/platform_util.h" 65 #include "chrome/browser/platform_util.h"
64 #include "chrome/browser/prerender/prerender_final_status.h" 66 #include "chrome/browser/prerender/prerender_final_status.h"
65 #include "chrome/browser/prerender/prerender_manager.h" 67 #include "chrome/browser/prerender/prerender_manager.h"
(...skipping 2613 matching lines...) Expand 10 before | Expand all | Expand 10 after
2679 void ChromeContentBrowserClient::GetURLRequestAutoMountHandlers( 2681 void ChromeContentBrowserClient::GetURLRequestAutoMountHandlers(
2680 std::vector<storage::URLRequestAutoMountHandler>* handlers) { 2682 std::vector<storage::URLRequestAutoMountHandler>* handlers) {
2681 for (size_t i = 0; i < extra_parts_.size(); ++i) 2683 for (size_t i = 0; i < extra_parts_.size(); ++i)
2682 extra_parts_[i]->GetURLRequestAutoMountHandlers(handlers); 2684 extra_parts_[i]->GetURLRequestAutoMountHandlers(handlers);
2683 } 2685 }
2684 2686
2685 ::rappor::RapporService* ChromeContentBrowserClient::GetRapporService() { 2687 ::rappor::RapporService* ChromeContentBrowserClient::GetRapporService() {
2686 return g_browser_process->rappor_service(); 2688 return g_browser_process->rappor_service();
2687 } 2689 }
2688 2690
2691 content::mojom::NetworkContextPtr
2692 ChromeContentBrowserClient::CreateNetworkContext(
2693 content::BrowserContext* context,
2694 bool in_memory,
2695 const base::FilePath& relative_partition_path) {
2696 if (relative_partition_path.empty()) {
2697 return ProfileNetworkContextServiceFactory::GetForContext(context)
2698 ->CreateMainNetworkContext();
2699 }
2700 // TODO(mmenke): Implement this.
Randy Smith (Not in Mondays) 2017/07/20 17:38:34 nit, suggestion: Enhance TODO to indicate what's m
Randy Smith (Not in Mondays) 2017/07/20 17:38:34 Confirming that this TODO is basically parallel to
mmenke 2017/07/20 18:31:30 Not quite analogous - I'm not sure it will even ma
mmenke 2017/07/20 18:31:30 Done. Left this pretty general ("Implement this o
2701 return ContentBrowserClient::CreateNetworkContext(context, in_memory,
2702 relative_partition_path);
2703 }
2704
2689 void ChromeContentBrowserClient::GetAdditionalFileSystemBackends( 2705 void ChromeContentBrowserClient::GetAdditionalFileSystemBackends(
2690 content::BrowserContext* browser_context, 2706 content::BrowserContext* browser_context,
2691 const base::FilePath& storage_partition_path, 2707 const base::FilePath& storage_partition_path,
2692 std::vector<std::unique_ptr<storage::FileSystemBackend>>* 2708 std::vector<std::unique_ptr<storage::FileSystemBackend>>*
2693 additional_backends) { 2709 additional_backends) {
2694 #if defined(OS_CHROMEOS) 2710 #if defined(OS_CHROMEOS)
2695 storage::ExternalMountPoints* external_mount_points = 2711 storage::ExternalMountPoints* external_mount_points =
2696 content::BrowserContext::GetMountPoints(browser_context); 2712 content::BrowserContext::GetMountPoints(browser_context);
2697 DCHECK(external_mount_points); 2713 DCHECK(external_mount_points);
2698 auto backend = base::MakeUnique<chromeos::FileSystemBackend>( 2714 auto backend = base::MakeUnique<chromeos::FileSystemBackend>(
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
3449 // |safe_browsing_service_| may be unavailable in tests. 3465 // |safe_browsing_service_| may be unavailable in tests.
3450 if (safe_browsing_service_ && !safe_browsing_url_checker_delegate_) { 3466 if (safe_browsing_service_ && !safe_browsing_url_checker_delegate_) {
3451 safe_browsing_url_checker_delegate_ = 3467 safe_browsing_url_checker_delegate_ =
3452 new safe_browsing::UrlCheckerDelegateImpl( 3468 new safe_browsing::UrlCheckerDelegateImpl(
3453 safe_browsing_service_->database_manager(), 3469 safe_browsing_service_->database_manager(),
3454 safe_browsing_service_->ui_manager()); 3470 safe_browsing_service_->ui_manager());
3455 } 3471 }
3456 3472
3457 return safe_browsing_url_checker_delegate_.get(); 3473 return safe_browsing_url_checker_delegate_.get();
3458 } 3474 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698