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

Unified Diff: chrome/browser/net/chrome_url_request_context.cc

Issue 3047052: chromeos: 1st draft of ProxyConfigService for chromeos... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/proxy_config_service_impl_unittest.cc ('k') | chrome/browser/profile.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/chrome_url_request_context.cc
===================================================================
--- chrome/browser/net/chrome_url_request_context.cc (revision 56956)
+++ chrome/browser/net/chrome_url_request_context.cc (working copy)
@@ -40,6 +40,10 @@
#include "net/ocsp/nss_ocsp.h"
#endif
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/proxy_config_service.h"
+#endif // defined(OS_CHROMEOS)
+
namespace {
// ----------------------------------------------------------------------------
@@ -58,22 +62,27 @@
// Helper methods to initialize proxy
// ----------------------------------------------------------------------------
-net::ProxyConfigService* CreateProxyConfigService(
- const PrefService* pref_service) {
+net::ProxyConfigService* CreateProxyConfigService(Profile* profile) {
// The linux gconf-based proxy settings getter relies on being initialized
// from the UI thread.
CheckCurrentlyOnMainThread();
- scoped_ptr<net::ProxyConfig> proxy_config(CreateProxyConfig(pref_service));
+ scoped_ptr<net::ProxyConfig> proxy_config(CreateProxyConfig(
+ profile->GetPrefs()));
if (!proxy_config.get()) {
// Use system settings.
// TODO(port): the IO and FILE message loops are only used by Linux. Can
// that code be moved to chrome/browser instead of being in net, so that it
// can use ChromeThread instead of raw MessageLoop pointers? See bug 25354.
+#if defined(OS_CHROMEOS)
+ return new chromeos::ProxyConfigService(
+ profile->GetChromeOSProxyConfigServiceImpl());
+#else
return net::ProxyService::CreateSystemProxyConfigService(
g_browser_process->io_thread()->message_loop(),
g_browser_process->file_thread()->message_loop());
+#endif // defined(OS_CHROMEOS)
}
// Otherwise use the fixed settings from the command line.
@@ -225,7 +234,7 @@
// We need to initialize the ProxyConfigService from the UI thread
// because on linux it relies on initializing things through gconf,
// and needs to be on the main thread.
- proxy_config_service_(CreateProxyConfigService(profile->GetPrefs())) {
+ proxy_config_service_(CreateProxyConfigService(profile)) {
}
virtual ChromeURLRequestContext* Create();
« no previous file with comments | « chrome/browser/chromeos/proxy_config_service_impl_unittest.cc ('k') | chrome/browser/profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698