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

Unified Diff: net/proxy/proxy_server_mac.cc

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 | « net/proxy/proxy_server.cc ('k') | net/proxy/proxy_server_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_server_mac.cc
diff --git a/net/proxy/proxy_server_mac.cc b/net/proxy/proxy_server_mac.cc
deleted file mode 100644
index fe3faa93e52fe10db4092eb57794f98ba24dd11a..0000000000000000000000000000000000000000
--- a/net/proxy/proxy_server_mac.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "net/proxy/proxy_server.h"
-
-#include <CoreFoundation/CoreFoundation.h>
-
-#include <string>
-
-#include "base/logging.h"
-#include "base/mac/foundation_util.h"
-#include "base/strings/sys_string_conversions.h"
-
-namespace net {
-
-// static
-ProxyServer ProxyServer::FromDictionary(Scheme scheme,
- CFDictionaryRef dict,
- CFStringRef host_key,
- CFStringRef port_key) {
- if (scheme == SCHEME_INVALID || scheme == SCHEME_DIRECT) {
- // No hostname port to extract; we are done.
- return ProxyServer(scheme, HostPortPair());
- }
-
- CFStringRef host_ref =
- base::mac::GetValueFromDictionary<CFStringRef>(dict, host_key);
- if (!host_ref) {
- LOG(WARNING) << "Could not find expected key "
- << base::SysCFStringRefToUTF8(host_key)
- << " in the proxy dictionary";
- return ProxyServer(); // Invalid.
- }
- std::string host = base::SysCFStringRefToUTF8(host_ref);
-
- CFNumberRef port_ref =
- base::mac::GetValueFromDictionary<CFNumberRef>(dict, port_key);
- int port;
- if (port_ref) {
- CFNumberGetValue(port_ref, kCFNumberIntType, &port);
- } else {
- port = GetDefaultPortForScheme(scheme);
- }
-
- return ProxyServer(scheme, HostPortPair(host, port));
-}
-
-} // namespace net
« no previous file with comments | « net/proxy/proxy_server.cc ('k') | net/proxy/proxy_server_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698