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

Side by Side Diff: content/public/browser/content_browser_client.h

Issue 2976323002: Hook up ProfileIOData's URLRequestContext to a NetworkService. (Closed)
Patch Set: Response to comments 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 #ifndef CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
11 #include <memory> 11 #include <memory>
12 #include <string> 12 #include <string>
13 #include <utility> 13 #include <utility>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/callback.h" 16 #include "base/callback.h"
17 #include "base/task_scheduler/task_scheduler.h" 17 #include "base/task_scheduler/task_scheduler.h"
18 #include "base/values.h" 18 #include "base/values.h"
19 #include "build/build_config.h" 19 #include "build/build_config.h"
20 #include "content/public/browser/certificate_request_result_type.h" 20 #include "content/public/browser/certificate_request_result_type.h"
21 #include "content/public/browser/navigation_throttle.h" 21 #include "content/public/browser/navigation_throttle.h"
22 #include "content/public/common/associated_interface_registry.h" 22 #include "content/public/common/associated_interface_registry.h"
23 #include "content/public/common/content_client.h" 23 #include "content/public/common/content_client.h"
24 #include "content/public/common/media_stream_request.h" 24 #include "content/public/common/media_stream_request.h"
25 #include "content/public/common/network_service.mojom.h"
25 #include "content/public/common/resource_type.h" 26 #include "content/public/common/resource_type.h"
26 #include "content/public/common/sandbox_type.h" 27 #include "content/public/common/sandbox_type.h"
27 #include "content/public/common/socket_permission_request.h" 28 #include "content/public/common/socket_permission_request.h"
28 #include "content/public/common/window_container_type.mojom.h" 29 #include "content/public/common/window_container_type.mojom.h"
29 #include "media/media_features.h" 30 #include "media/media_features.h"
30 #include "media/mojo/interfaces/remoting.mojom.h" 31 #include "media/mojo/interfaces/remoting.mojom.h"
31 #include "net/base/mime_util.h" 32 #include "net/base/mime_util.h"
32 #include "net/cookies/canonical_cookie.h" 33 #include "net/cookies/canonical_cookie.h"
33 #include "services/service_manager/embedder/embedded_service_info.h" 34 #include "services/service_manager/embedder/embedded_service_info.h"
34 #include "services/service_manager/public/cpp/binder_registry.h" 35 #include "services/service_manager/public/cpp/binder_registry.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 class TracingDelegate; 137 class TracingDelegate;
137 class URLLoaderThrottle; 138 class URLLoaderThrottle;
138 class VpnServiceProxy; 139 class VpnServiceProxy;
139 class WebContents; 140 class WebContents;
140 class WebContentsViewDelegate; 141 class WebContentsViewDelegate;
141 struct MainFunctionParams; 142 struct MainFunctionParams;
142 struct OpenURLParams; 143 struct OpenURLParams;
143 struct Referrer; 144 struct Referrer;
144 struct WebPreferences; 145 struct WebPreferences;
145 146
147 namespace mojom {
148 class NetworkContext;
149 }
150
146 // Embedder API (or SPI) for participating in browser logic, to be implemented 151 // Embedder API (or SPI) for participating in browser logic, to be implemented
147 // by the client of the content browser. See ChromeContentBrowserClient for the 152 // by the client of the content browser. See ChromeContentBrowserClient for the
148 // principal implementation. The methods are assumed to be called on the UI 153 // principal implementation. The methods are assumed to be called on the UI
149 // thread unless otherwise specified. Use this "escape hatch" sparingly, to 154 // thread unless otherwise specified. Use this "escape hatch" sparingly, to
150 // avoid the embedder interface ballooning and becoming very specific to Chrome. 155 // avoid the embedder interface ballooning and becoming very specific to Chrome.
151 // (Often, the call out to the client can happen in a different part of the code 156 // (Often, the call out to the client can happen in a different part of the code
152 // that either already has a hook out to the embedder, or calls out to one of 157 // that either already has a hook out to the embedder, or calls out to one of
153 // the observer interfaces.) 158 // the observer interfaces.)
154 class CONTENT_EXPORT ContentBrowserClient { 159 class CONTENT_EXPORT ContentBrowserClient {
155 public: 160 public:
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 // Provides parameters for initializing the global task scheduler. Default 823 // Provides parameters for initializing the global task scheduler. Default
819 // params are used if this returns nullptr. 824 // params are used if this returns nullptr.
820 virtual std::unique_ptr<base::TaskScheduler::InitParams> 825 virtual std::unique_ptr<base::TaskScheduler::InitParams>
821 GetTaskSchedulerInitParams(); 826 GetTaskSchedulerInitParams();
822 827
823 // Allows the embedder to register one or more URLLoaderThrottles for a 828 // Allows the embedder to register one or more URLLoaderThrottles for a
824 // URL request. This is used only when --enable-network-service is in effect. 829 // URL request. This is used only when --enable-network-service is in effect.
825 // This is called on the IO thread. 830 // This is called on the IO thread.
826 virtual std::vector<std::unique_ptr<URLLoaderThrottle>> 831 virtual std::vector<std::unique_ptr<URLLoaderThrottle>>
827 CreateURLLoaderThrottles(const base::Callback<WebContents*()>& wc_getter); 832 CreateURLLoaderThrottles(const base::Callback<WebContents*()>& wc_getter);
833
834 // Creates the main NetworkContext for a BrowserContext's StoragePartition.
835 // Only called when the network service is enabled. If |in_memory| is true,
836 // |relative_partition_path| is still a path that uniquely identifies the
837 // storage partition, though nothing should be written to it.
838 virtual mojom::NetworkContextPtr CreateNetworkContext(
839 BrowserContext* context,
840 bool in_memory,
841 const base::FilePath& relative_partition_path);
828 }; 842 };
829 843
830 } // namespace content 844 } // namespace content
831 845
832 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 846 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
OLDNEW
« no previous file with comments | « content/network/url_loader_unittest.cc ('k') | content/public/browser/content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698