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

Side by Side Diff: net/base/mapped_host_resolver.h

Issue 7529043: Rename NET_API to NET_EXPORT, and rename NET_TEST to NET_EXPORT_PRIVATE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 NET_BASE_MAPPED_HOST_RESOLVER_H_ 5 #ifndef NET_BASE_MAPPED_HOST_RESOLVER_H_
6 #define NET_BASE_MAPPED_HOST_RESOLVER_H_ 6 #define NET_BASE_MAPPED_HOST_RESOLVER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "net/base/host_mapping_rules.h" 12 #include "net/base/host_mapping_rules.h"
13 #include "net/base/host_resolver.h" 13 #include "net/base/host_resolver.h"
14 #include "net/base/net_api.h" 14 #include "net/base/net_export.h"
15 15
16 namespace net { 16 namespace net {
17 17
18 // This class wraps an existing HostResolver instance, but modifies the 18 // This class wraps an existing HostResolver instance, but modifies the
19 // request before passing it off to |impl|. This is different from 19 // request before passing it off to |impl|. This is different from
20 // MockHostResolver which does the remapping at the HostResolverProc 20 // MockHostResolver which does the remapping at the HostResolverProc
21 // layer, so it is able to preserve the effectiveness of the cache. 21 // layer, so it is able to preserve the effectiveness of the cache.
22 class NET_API MappedHostResolver : public HostResolver { 22 class NET_EXPORT MappedHostResolver : public HostResolver {
23 public: 23 public:
24 // Creates a MappedHostResolver that forwards all of its requests through 24 // Creates a MappedHostResolver that forwards all of its requests through
25 // |impl|. It takes ownership of |impl|. 25 // |impl|. It takes ownership of |impl|.
26 explicit MappedHostResolver(HostResolver* impl); 26 explicit MappedHostResolver(HostResolver* impl);
27 virtual ~MappedHostResolver(); 27 virtual ~MappedHostResolver();
28 28
29 // Adds a rule to this mapper. The format of the rule can be one of: 29 // Adds a rule to this mapper. The format of the rule can be one of:
30 // 30 //
31 // "MAP" <hostname_pattern> <replacement_host> [":" <replacement_port>] 31 // "MAP" <hostname_pattern> <replacement_host> [":" <replacement_port>]
32 // "EXCLUDE" <hostname_pattern> 32 // "EXCLUDE" <hostname_pattern>
(...skipping 26 matching lines...) Expand all
59 59
60 private: 60 private:
61 scoped_ptr<HostResolver> impl_; 61 scoped_ptr<HostResolver> impl_;
62 62
63 HostMappingRules rules_; 63 HostMappingRules rules_;
64 }; 64 };
65 65
66 } // namespace net 66 } // namespace net
67 67
68 #endif // NET_BASE_MAPPED_HOST_RESOLVER_H_ 68 #endif // NET_BASE_MAPPED_HOST_RESOLVER_H_
OLDNEW
« no previous file with comments | « net/base/listen_socket.h ('k') | net/base/mime_sniffer.h » ('j') | net/base/net_export.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698