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

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

Issue 2976323002: Hook up ProfileIOData's URLRequestContext to a NetworkService. (Closed)
Patch Set: X11 is bonkers 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 2603 matching lines...) Expand 10 before | Expand all | Expand 10 after
2669 void ChromeContentBrowserClient::GetURLRequestAutoMountHandlers( 2671 void ChromeContentBrowserClient::GetURLRequestAutoMountHandlers(
2670 std::vector<storage::URLRequestAutoMountHandler>* handlers) { 2672 std::vector<storage::URLRequestAutoMountHandler>* handlers) {
2671 for (size_t i = 0; i < extra_parts_.size(); ++i) 2673 for (size_t i = 0; i < extra_parts_.size(); ++i)
2672 extra_parts_[i]->GetURLRequestAutoMountHandlers(handlers); 2674 extra_parts_[i]->GetURLRequestAutoMountHandlers(handlers);
2673 } 2675 }
2674 2676
2675 ::rappor::RapporService* ChromeContentBrowserClient::GetRapporService() { 2677 ::rappor::RapporService* ChromeContentBrowserClient::GetRapporService() {
2676 return g_browser_process->rappor_service(); 2678 return g_browser_process->rappor_service();
2677 } 2679 }
2678 2680
2681 content::mojom::NetworkContextPtr
2682 ChromeContentBrowserClient::CreateMainNetworkContext(
2683 content::BrowserContext* context) {
2684 return ProfileNetworkContextServiceFactory::GetForContext(context)
2685 ->CreateMainNetworkContext();
2686 }
2687
2688 content::mojom::NetworkContextPtr
2689 ChromeContentBrowserClient::CreateNetworkContextForStoragePartition(
2690 content::BrowserContext* context,
2691 bool in_memory,
2692 const base::FilePath& partition_path) {
2693 // TODO(mmenke): Implement this.
2694 return ContentBrowserClient::CreateMainNetworkContext(context);
2695 }
2696
2679 void ChromeContentBrowserClient::GetAdditionalFileSystemBackends( 2697 void ChromeContentBrowserClient::GetAdditionalFileSystemBackends(
2680 content::BrowserContext* browser_context, 2698 content::BrowserContext* browser_context,
2681 const base::FilePath& storage_partition_path, 2699 const base::FilePath& storage_partition_path,
2682 std::vector<std::unique_ptr<storage::FileSystemBackend>>* 2700 std::vector<std::unique_ptr<storage::FileSystemBackend>>*
2683 additional_backends) { 2701 additional_backends) {
2684 #if defined(OS_CHROMEOS) 2702 #if defined(OS_CHROMEOS)
2685 storage::ExternalMountPoints* external_mount_points = 2703 storage::ExternalMountPoints* external_mount_points =
2686 content::BrowserContext::GetMountPoints(browser_context); 2704 content::BrowserContext::GetMountPoints(browser_context);
2687 DCHECK(external_mount_points); 2705 DCHECK(external_mount_points);
2688 auto backend = base::MakeUnique<chromeos::FileSystemBackend>( 2706 auto backend = base::MakeUnique<chromeos::FileSystemBackend>(
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
3415 // displayed URL when rewriting chrome://help to chrome://settings/help. 3433 // displayed URL when rewriting chrome://help to chrome://settings/help.
3416 return url->SchemeIs(content::kChromeUIScheme) && 3434 return url->SchemeIs(content::kChromeUIScheme) &&
3417 url->host() == chrome::kChromeUISettingsHost; 3435 url->host() == chrome::kChromeUISettingsHost;
3418 } 3436 }
3419 3437
3420 // static 3438 // static
3421 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( 3439 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting(
3422 const storage::QuotaSettings* settings) { 3440 const storage::QuotaSettings* settings) {
3423 g_default_quota_settings = settings; 3441 g_default_quota_settings = settings;
3424 } 3442 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698