summaryrefslogtreecommitdiffstats
path: root/net/base/address_list.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/base/address_list.h')
-rw-r--r--net/base/address_list.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/net/base/address_list.h b/net/base/address_list.h
index b477987..f0eb0ce 100644
--- a/net/base/address_list.h
+++ b/net/base/address_list.h
@@ -1,10 +1,12 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
#ifndef NET_BASE_ADDRESS_LIST_H_
#define NET_BASE_ADDRESS_LIST_H_
+#include <string>
+
#include "base/ref_counted.h"
struct addrinfo;
@@ -46,6 +48,13 @@ class AddressList {
// a reference to |src|'s data.) Otherwise we will make a copy.
void SetFrom(const AddressList& src, int port);
+ // Gets the canonical name for the address.
+ // If the canonical name exists, |*canonical_name| is filled in with the
+ // value and true is returned. If it does not exist, |*canonical_name| is
+ // not altered and false is returned.
+ // |canonical_name| must be a non-null value.
+ bool GetCanonicalName(std::string* canonical_name) const;
+
// Clears all data from this address list. This leaves the list in the same
// empty state as when first constructed.
void Reset();