diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-18 21:47:52 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-18 21:47:52 +0000 |
commit | 2e936d97d73807c42a7c34863206d1de213626fc (patch) | |
tree | c07c68d26b904b6069b87db98d1679e5af5e4b73 /net/ftp | |
parent | 8419eb65d1f53275cc852429b89b3ca7619def9a (diff) | |
download | chromium_src-2e936d97d73807c42a7c34863206d1de213626fc.zip chromium_src-2e936d97d73807c42a7c34863206d1de213626fc.tar.gz chromium_src-2e936d97d73807c42a7c34863206d1de213626fc.tar.bz2 |
Ftp: Add NET_API for net.dll
BUG=76997
TEST=NONE
Review URL: http://codereview.chromium.org/7013067
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85818 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/ftp')
-rw-r--r-- | net/ftp/ftp_auth_cache.h | 5 | ||||
-rw-r--r-- | net/ftp/ftp_ctrl_response_buffer.h | 7 | ||||
-rw-r--r-- | net/ftp/ftp_directory_listing_parser.h | 8 | ||||
-rw-r--r-- | net/ftp/ftp_directory_listing_parser_ls.h | 8 | ||||
-rw-r--r-- | net/ftp/ftp_directory_listing_parser_netware.h | 3 | ||||
-rw-r--r-- | net/ftp/ftp_directory_listing_parser_vms.h | 3 | ||||
-rw-r--r-- | net/ftp/ftp_directory_listing_parser_windows.h | 3 | ||||
-rw-r--r-- | net/ftp/ftp_network_layer.h | 3 | ||||
-rw-r--r-- | net/ftp/ftp_network_session.h | 3 | ||||
-rw-r--r-- | net/ftp/ftp_network_transaction.h | 2 | ||||
-rw-r--r-- | net/ftp/ftp_transaction.h | 5 | ||||
-rw-r--r-- | net/ftp/ftp_transaction_factory.h | 6 | ||||
-rw-r--r-- | net/ftp/ftp_util.h | 3 |
13 files changed, 37 insertions, 22 deletions
diff --git a/net/ftp/ftp_auth_cache.h b/net/ftp/ftp_auth_cache.h index f935fe9..1ed83f0 100644 --- a/net/ftp/ftp_auth_cache.h +++ b/net/ftp/ftp_auth_cache.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// 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. @@ -10,6 +10,7 @@ #include "base/string16.h" #include "googleurl/src/gurl.h" +#include "net/base/net_api.h" namespace net { @@ -21,7 +22,7 @@ namespace net { // GURL("ftp://myserver") -- OK (implied port of 21) // GURL("ftp://myserver:21") -- OK // GURL("ftp://myserver/PATH") -- WRONG, paths not allowed -class FtpAuthCache { +class NET_TEST FtpAuthCache { public: // Maximum number of entries we allow in the cache. static const size_t kMaxEntries; diff --git a/net/ftp/ftp_ctrl_response_buffer.h b/net/ftp/ftp_ctrl_response_buffer.h index 219a2d4..031a666 100644 --- a/net/ftp/ftp_ctrl_response_buffer.h +++ b/net/ftp/ftp_ctrl_response_buffer.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// 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. @@ -12,10 +12,11 @@ #include <vector> #include "base/basictypes.h" +#include "net/base/net_api.h" namespace net { -struct FtpCtrlResponse { +struct NET_TEST FtpCtrlResponse { static const int kInvalidStatusCode; FtpCtrlResponse(); @@ -25,7 +26,7 @@ struct FtpCtrlResponse { std::vector<std::string> lines; // Response lines, without CRLFs. }; -class FtpCtrlResponseBuffer { +class NET_TEST FtpCtrlResponseBuffer { public: FtpCtrlResponseBuffer(); ~FtpCtrlResponseBuffer(); diff --git a/net/ftp/ftp_directory_listing_parser.h b/net/ftp/ftp_directory_listing_parser.h index d75ef82..56277e5 100644 --- a/net/ftp/ftp_directory_listing_parser.h +++ b/net/ftp/ftp_directory_listing_parser.h @@ -12,6 +12,7 @@ #include "base/basictypes.h" #include "base/string16.h" #include "base/time.h" +#include "net/base/net_api.h" namespace net { @@ -35,9 +36,10 @@ struct FtpDirectoryListingEntry { // Parses an FTP directory listing |text|. On success fills in |entries|. // Returns network error code. -int ParseFtpDirectoryListing(const std::string& text, - const base::Time& current_time, - std::vector<FtpDirectoryListingEntry>* entries); +NET_API int ParseFtpDirectoryListing( + const std::string& text, + const base::Time& current_time, + std::vector<FtpDirectoryListingEntry>* entries); } // namespace net diff --git a/net/ftp/ftp_directory_listing_parser_ls.h b/net/ftp/ftp_directory_listing_parser_ls.h index d27bd91..5eeeeae 100644 --- a/net/ftp/ftp_directory_listing_parser_ls.h +++ b/net/ftp/ftp_directory_listing_parser_ls.h @@ -9,6 +9,7 @@ #include <vector> #include "base/string16.h" +#include "net/base/net_api.h" namespace base { class Time; @@ -19,9 +20,10 @@ namespace net { struct FtpDirectoryListingEntry; // Parses "ls -l" FTP directory listing. Returns true on success. -bool ParseFtpDirectoryListingLs(const std::vector<string16>& lines, - const base::Time& current_time, - std::vector<FtpDirectoryListingEntry>* entries); +NET_TEST bool ParseFtpDirectoryListingLs( + const std::vector<string16>& lines, + const base::Time& current_time, + std::vector<FtpDirectoryListingEntry>* entries); } // namespace net diff --git a/net/ftp/ftp_directory_listing_parser_netware.h b/net/ftp/ftp_directory_listing_parser_netware.h index b72a49f..6e504e7 100644 --- a/net/ftp/ftp_directory_listing_parser_netware.h +++ b/net/ftp/ftp_directory_listing_parser_netware.h @@ -9,6 +9,7 @@ #include <vector> #include "base/string16.h" +#include "net/base/net_api.h" namespace base { class Time; @@ -19,7 +20,7 @@ namespace net { struct FtpDirectoryListingEntry; // Parses Netware FTP directory listing. Returns true on success. -bool ParseFtpDirectoryListingNetware( +NET_TEST bool ParseFtpDirectoryListingNetware( const std::vector<string16>& lines, const base::Time& current_time, std::vector<FtpDirectoryListingEntry>* entries); diff --git a/net/ftp/ftp_directory_listing_parser_vms.h b/net/ftp/ftp_directory_listing_parser_vms.h index 8986fcb..59bcc12 100644 --- a/net/ftp/ftp_directory_listing_parser_vms.h +++ b/net/ftp/ftp_directory_listing_parser_vms.h @@ -9,13 +9,14 @@ #include <vector> #include "base/string16.h" +#include "net/base/net_api.h" namespace net { struct FtpDirectoryListingEntry; // Parses VMS FTP directory listing. Returns true on success. -bool ParseFtpDirectoryListingVms( +NET_TEST bool ParseFtpDirectoryListingVms( const std::vector<string16>& lines, std::vector<FtpDirectoryListingEntry>* entries); diff --git a/net/ftp/ftp_directory_listing_parser_windows.h b/net/ftp/ftp_directory_listing_parser_windows.h index 581e08c..a77e5da 100644 --- a/net/ftp/ftp_directory_listing_parser_windows.h +++ b/net/ftp/ftp_directory_listing_parser_windows.h @@ -9,13 +9,14 @@ #include <vector> #include "base/string16.h" +#include "net/base/net_api.h" namespace net { struct FtpDirectoryListingEntry; // Parses Windows FTP directory listing. Returns true on success. -bool ParseFtpDirectoryListingWindows( +NET_TEST bool ParseFtpDirectoryListingWindows( const std::vector<string16>& lines, std::vector<FtpDirectoryListingEntry>* entries); diff --git a/net/ftp/ftp_network_layer.h b/net/ftp/ftp_network_layer.h index 12ada88..91a3e608 100644 --- a/net/ftp/ftp_network_layer.h +++ b/net/ftp/ftp_network_layer.h @@ -7,6 +7,7 @@ #pragma once #include "base/memory/ref_counted.h" +#include "net/base/net_api.h" #include "net/ftp/ftp_transaction_factory.h" namespace net { @@ -14,7 +15,7 @@ namespace net { class FtpNetworkSession; class HostResolver; -class FtpNetworkLayer : public FtpTransactionFactory { +class NET_API FtpNetworkLayer : public FtpTransactionFactory { public: explicit FtpNetworkLayer(HostResolver* host_resolver); ~FtpNetworkLayer(); diff --git a/net/ftp/ftp_network_session.h b/net/ftp/ftp_network_session.h index 2f6ede8..b39151c 100644 --- a/net/ftp/ftp_network_session.h +++ b/net/ftp/ftp_network_session.h @@ -7,6 +7,7 @@ #pragma once #include "base/memory/ref_counted.h" +#include "net/base/net_api.h" #include "net/ftp/ftp_auth_cache.h" namespace net { @@ -14,7 +15,7 @@ namespace net { class HostResolver; // This class holds session objects used by FtpNetworkTransaction objects. -class FtpNetworkSession : public base::RefCounted<FtpNetworkSession> { +class NET_TEST FtpNetworkSession : public base::RefCounted<FtpNetworkSession> { public: explicit FtpNetworkSession(HostResolver* host_resolver); diff --git a/net/ftp/ftp_network_transaction.h b/net/ftp/ftp_network_transaction.h index 1893190..5589728 100644 --- a/net/ftp/ftp_network_transaction.h +++ b/net/ftp/ftp_network_transaction.h @@ -25,7 +25,7 @@ class ClientSocketFactory; class FtpNetworkSession; class StreamSocket; -class FtpNetworkTransaction : public FtpTransaction { +class NET_TEST FtpNetworkTransaction : public FtpTransaction { public: FtpNetworkTransaction(FtpNetworkSession* session, ClientSocketFactory* socket_factory); diff --git a/net/ftp/ftp_transaction.h b/net/ftp/ftp_transaction.h index b1f1add..a3a6a12 100644 --- a/net/ftp/ftp_transaction.h +++ b/net/ftp/ftp_transaction.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// 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. @@ -10,6 +10,7 @@ #include "net/base/completion_callback.h" #include "net/base/io_buffer.h" #include "net/base/load_states.h" +#include "net/base/net_api.h" namespace net { @@ -18,7 +19,7 @@ class FtpRequestInfo; class BoundNetLog; // Represents a single FTP transaction. -class FtpTransaction { +class NET_TEST FtpTransaction { public: // Stops any pending IO and destroys the transaction object. virtual ~FtpTransaction() {} diff --git a/net/ftp/ftp_transaction_factory.h b/net/ftp/ftp_transaction_factory.h index f979714..30ec14d 100644 --- a/net/ftp/ftp_transaction_factory.h +++ b/net/ftp/ftp_transaction_factory.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// 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. @@ -6,12 +6,14 @@ #define NET_FTP_FTP_TRANSACTION_FACTORY_H_ #pragma once +#include "net/base/net_api.h" + namespace net { class FtpTransaction; // An interface to a class that can create FtpTransaction objects. -class FtpTransactionFactory { +class NET_API FtpTransactionFactory { public: virtual ~FtpTransactionFactory() {} diff --git a/net/ftp/ftp_util.h b/net/ftp/ftp_util.h index a3189c7..a099535 100644 --- a/net/ftp/ftp_util.h +++ b/net/ftp/ftp_util.h @@ -9,6 +9,7 @@ #include <string> #include "base/string16.h" +#include "net/base/net_api.h" namespace base { class Time; @@ -16,7 +17,7 @@ class Time; namespace net { -class FtpUtil { +class NET_TEST FtpUtil { public: // Converts Unix file path to VMS path (must be a file, and not a directory). static std::string UnixFilePathToVMS(const std::string& unix_path); |