summaryrefslogtreecommitdiffstats
path: root/net/proxy
diff options
context:
space:
mode:
authorericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-18 22:02:21 +0000
committerericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-18 22:02:21 +0000
commit6dfc67bdd9eb27a8dcf6fe74806d4d26f8534cd2 (patch)
tree661f4db41d77c732fb3a4d7798d6c9f2c399269b /net/proxy
parentb9fbf52c1f0dec4e66aed950cb40d05836fcead5 (diff)
downloadchromium_src-6dfc67bdd9eb27a8dcf6fe74806d4d26f8534cd2.zip
chromium_src-6dfc67bdd9eb27a8dcf6fe74806d4d26f8534cd2.tar.gz
chromium_src-6dfc67bdd9eb27a8dcf6fe74806d4d26f8534cd2.tar.bz2
Merge some changes from branches/mac_july_2008 to trunk.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1002 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy')
-rw-r--r--net/proxy/proxy_service.cc13
-rw-r--r--net/proxy/proxy_service.h4
2 files changed, 17 insertions, 0 deletions
diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc
index 1c6c4059..c684979 100644
--- a/net/proxy/proxy_service.cc
+++ b/net/proxy/proxy_service.cc
@@ -29,12 +29,15 @@
#include "net/proxy/proxy_service.h"
+#if defined(OS_WIN)
#include <windows.h>
#include <winhttp.h>
+#endif
#include <algorithm>
#include "base/message_loop.h"
+#include "base/notimplemented.h"
#include "base/string_tokenizer.h"
#include "base/string_util.h"
#include "googleurl/src/gurl.h"
@@ -165,6 +168,7 @@ void ProxyInfo::UseNamedProxy(const std::string& proxy_server) {
proxy_list_.Set(proxy_server);
}
+#if defined(OS_WIN)
void ProxyInfo::Apply(HINTERNET request_handle) {
WINHTTP_PROXY_INFO pi;
std::wstring proxy; // We need to declare this variable here because
@@ -182,6 +186,7 @@ void ProxyInfo::Apply(HINTERNET request_handle) {
}
WinHttpSetOption(request_handle, WINHTTP_OPTION_PROXY, &pi, sizeof(pi));
}
+#endif
// ProxyService::PacRequest ---------------------------------------------------
@@ -441,6 +446,14 @@ void ProxyService::DidCompletePacRequest(int config_id, int result_code) {
}
void ProxyService::UpdateConfig() {
+#if !defined(WIN_OS)
+ if (!resolver_) {
+ // Tied to the NOTIMPLEMENTED in HttpNetworkLayer::HttpNetworkLayer()
+ NOTIMPLEMENTED();
+ return;
+ }
+#endif
+
ProxyConfig latest;
if (resolver_->GetProxyConfig(&latest) != OK)
return;
diff --git a/net/proxy/proxy_service.h b/net/proxy/proxy_service.h
index ee2bd23..80a15d1 100644
--- a/net/proxy/proxy_service.h
+++ b/net/proxy/proxy_service.h
@@ -40,7 +40,9 @@
#include "base/time.h"
#include "net/base/completion_callback.h"
+#if defined(OS_WIN)
typedef LPVOID HINTERNET; // From winhttp.h
+#endif
class GURL;
@@ -239,8 +241,10 @@ class ProxyInfo {
// This may optionally be a semi-colon delimited list of proxy servers.
void UseNamedProxy(const std::string& proxy_server);
+#if defined(OS_WIN)
// Apply this proxy information to the given WinHTTP request handle.
void Apply(HINTERNET request_handle);
+#endif
// Returns true if this proxy info specifies a direct connection.
bool is_direct() const { return proxy_list_.Get().empty(); }