diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-18 20:21:31 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-18 20:21:31 +0000 |
commit | b104b50ddb1d70d95ff9ace7a6fb30ec3b1aeb17 (patch) | |
tree | 0d35c3f624aec7c6de8824fab2b9521bfff1dbff /net/ftp | |
parent | d13509f32546e26332733ac6153d359fbd566eaa (diff) | |
download | chromium_src-b104b50ddb1d70d95ff9ace7a6fb30ec3b1aeb17.zip chromium_src-b104b50ddb1d70d95ff9ace7a6fb30ec3b1aeb17.tar.gz chromium_src-b104b50ddb1d70d95ff9ace7a6fb30ec3b1aeb17.tar.bz2 |
FBTF: Monster ctor patch after changing heuristics in clang plugin.
(Only 916k this time off Debug Linux .a files)
BUG=none
TEST=compiles
Review URL: http://codereview.chromium.org/3814013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62967 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/ftp')
-rw-r--r-- | net/ftp/ftp_ctrl_response_buffer.cc | 21 | ||||
-rw-r--r-- | net/ftp/ftp_ctrl_response_buffer.h | 19 | ||||
-rw-r--r-- | net/ftp/ftp_directory_listing_parser_hprc.cc | 2 | ||||
-rw-r--r-- | net/ftp/ftp_directory_listing_parser_hprc.h | 1 | ||||
-rw-r--r-- | net/ftp/ftp_directory_listing_parser_ls.cc | 2 | ||||
-rw-r--r-- | net/ftp/ftp_directory_listing_parser_ls.h | 1 | ||||
-rw-r--r-- | net/ftp/ftp_directory_listing_parser_mlsd.cc | 5 | ||||
-rw-r--r-- | net/ftp/ftp_directory_listing_parser_mlsd.h | 1 | ||||
-rw-r--r-- | net/ftp/ftp_directory_listing_parser_netware.cc | 2 | ||||
-rw-r--r-- | net/ftp/ftp_directory_listing_parser_netware.h | 1 | ||||
-rw-r--r-- | net/ftp/ftp_directory_listing_parser_vms.cc | 2 | ||||
-rw-r--r-- | net/ftp/ftp_directory_listing_parser_vms.h | 1 | ||||
-rw-r--r-- | net/ftp/ftp_directory_listing_parser_windows.cc | 5 | ||||
-rw-r--r-- | net/ftp/ftp_directory_listing_parser_windows.h | 1 | ||||
-rw-r--r-- | net/ftp/ftp_network_session.cc | 15 | ||||
-rw-r--r-- | net/ftp/ftp_network_session.h | 5 |
16 files changed, 64 insertions, 20 deletions
diff --git a/net/ftp/ftp_ctrl_response_buffer.cc b/net/ftp/ftp_ctrl_response_buffer.cc index c9ee5dd..950e1e0 100644 --- a/net/ftp/ftp_ctrl_response_buffer.cc +++ b/net/ftp/ftp_ctrl_response_buffer.cc @@ -14,6 +14,14 @@ namespace net { // static const int FtpCtrlResponse::kInvalidStatusCode = -1; +FtpCtrlResponse::FtpCtrlResponse() : status_code(kInvalidStatusCode) {} + +FtpCtrlResponse::~FtpCtrlResponse() {} + +FtpCtrlResponseBuffer::FtpCtrlResponseBuffer() : multiline_(false) {} + +FtpCtrlResponseBuffer::~FtpCtrlResponseBuffer() {} + int FtpCtrlResponseBuffer::ConsumeData(const char* data, int data_length) { buffer_.append(data, data_length); ExtractFullLinesFromBuffer(); @@ -64,6 +72,19 @@ int FtpCtrlResponseBuffer::ConsumeData(const char* data, int data_length) { return OK; } +FtpCtrlResponse FtpCtrlResponseBuffer::PopResponse() { + FtpCtrlResponse result = responses_.front(); + responses_.pop(); + return result; +} + +FtpCtrlResponseBuffer::ParsedLine::ParsedLine() + : has_status_code(false), + is_multiline(false), + is_complete(false), + status_code(FtpCtrlResponse::kInvalidStatusCode) { +} + // static FtpCtrlResponseBuffer::ParsedLine FtpCtrlResponseBuffer::ParseLine( const std::string& line) { diff --git a/net/ftp/ftp_ctrl_response_buffer.h b/net/ftp/ftp_ctrl_response_buffer.h index b98f494..219a2d4 100644 --- a/net/ftp/ftp_ctrl_response_buffer.h +++ b/net/ftp/ftp_ctrl_response_buffer.h @@ -18,7 +18,8 @@ namespace net { struct FtpCtrlResponse { static const int kInvalidStatusCode; - FtpCtrlResponse() : status_code(kInvalidStatusCode) {} + FtpCtrlResponse(); + ~FtpCtrlResponse(); int status_code; // Three-digit status code. std::vector<std::string> lines; // Response lines, without CRLFs. @@ -26,7 +27,8 @@ struct FtpCtrlResponse { class FtpCtrlResponseBuffer { public: - FtpCtrlResponseBuffer() : multiline_(false) {} + FtpCtrlResponseBuffer(); + ~FtpCtrlResponseBuffer(); // Called when data is received from the control socket. Returns error code. int ConsumeData(const char* data, int data_length); @@ -37,20 +39,11 @@ class FtpCtrlResponseBuffer { // Returns the next response. It is an error to call this function // unless ResponseAvailable returns true. - FtpCtrlResponse PopResponse() { - FtpCtrlResponse result = responses_.front(); - responses_.pop(); - return result; - } + FtpCtrlResponse PopResponse(); private: struct ParsedLine { - ParsedLine() - : has_status_code(false), - is_multiline(false), - is_complete(false), - status_code(FtpCtrlResponse::kInvalidStatusCode) { - } + ParsedLine(); // Indicates that this line begins with a valid 3-digit status code. bool has_status_code; diff --git a/net/ftp/ftp_directory_listing_parser_hprc.cc b/net/ftp/ftp_directory_listing_parser_hprc.cc index b65ec68..621aba1 100644 --- a/net/ftp/ftp_directory_listing_parser_hprc.cc +++ b/net/ftp/ftp_directory_listing_parser_hprc.cc @@ -14,6 +14,8 @@ FtpDirectoryListingParserHprc::FtpDirectoryListingParserHprc( : current_time_(current_time) { } +FtpDirectoryListingParserHprc::~FtpDirectoryListingParserHprc() {} + FtpServerType FtpDirectoryListingParserHprc::GetServerType() const { return SERVER_HPRC; } diff --git a/net/ftp/ftp_directory_listing_parser_hprc.h b/net/ftp/ftp_directory_listing_parser_hprc.h index 73b5195..d153810 100644 --- a/net/ftp/ftp_directory_listing_parser_hprc.h +++ b/net/ftp/ftp_directory_listing_parser_hprc.h @@ -22,6 +22,7 @@ class FtpDirectoryListingParserHprc : public FtpDirectoryListingParser { // that we don't know, |current_time| will be used. This allows passing // a specific date during testing. explicit FtpDirectoryListingParserHprc(const base::Time& current_time); + virtual ~FtpDirectoryListingParserHprc(); // FtpDirectoryListingParser methods: virtual FtpServerType GetServerType() const; diff --git a/net/ftp/ftp_directory_listing_parser_ls.cc b/net/ftp/ftp_directory_listing_parser_ls.cc index 9fd2400..89fc3d8 100644 --- a/net/ftp/ftp_directory_listing_parser_ls.cc +++ b/net/ftp/ftp_directory_listing_parser_ls.cc @@ -89,6 +89,8 @@ FtpDirectoryListingParserLs::FtpDirectoryListingParserLs( current_time_(current_time) { } +FtpDirectoryListingParserLs::~FtpDirectoryListingParserLs() {} + bool FtpDirectoryListingParserLs::ConsumeLine(const string16& line) { if (line.empty() && !received_nonempty_line_) { // Allow empty lines only at the beginning of the listing. For example VMS diff --git a/net/ftp/ftp_directory_listing_parser_ls.h b/net/ftp/ftp_directory_listing_parser_ls.h index 54856c1..6cb3655 100644 --- a/net/ftp/ftp_directory_listing_parser_ls.h +++ b/net/ftp/ftp_directory_listing_parser_ls.h @@ -20,6 +20,7 @@ class FtpDirectoryListingParserLs : public FtpDirectoryListingParser { // date strings, |current_time| will be used. This allows passing a specific // date during testing. explicit FtpDirectoryListingParserLs(const base::Time& current_time); + virtual ~FtpDirectoryListingParserLs(); // FtpDirectoryListingParser methods: virtual FtpServerType GetServerType() const { return SERVER_LS; } diff --git a/net/ftp/ftp_directory_listing_parser_mlsd.cc b/net/ftp/ftp_directory_listing_parser_mlsd.cc index dc6dace..fa9a44e 100644 --- a/net/ftp/ftp_directory_listing_parser_mlsd.cc +++ b/net/ftp/ftp_directory_listing_parser_mlsd.cc @@ -48,8 +48,9 @@ bool MlsdDateListingToTime(const string16& text, base::Time* time) { namespace net { -FtpDirectoryListingParserMlsd::FtpDirectoryListingParserMlsd() { -} +FtpDirectoryListingParserMlsd::FtpDirectoryListingParserMlsd() {} + +FtpDirectoryListingParserMlsd::~FtpDirectoryListingParserMlsd() {} bool FtpDirectoryListingParserMlsd::ConsumeLine(const string16& line) { // The first space indicates where the filename begins. diff --git a/net/ftp/ftp_directory_listing_parser_mlsd.h b/net/ftp/ftp_directory_listing_parser_mlsd.h index 94df607..c3e3acf 100644 --- a/net/ftp/ftp_directory_listing_parser_mlsd.h +++ b/net/ftp/ftp_directory_listing_parser_mlsd.h @@ -17,6 +17,7 @@ namespace net { class FtpDirectoryListingParserMlsd : public FtpDirectoryListingParser { public: FtpDirectoryListingParserMlsd(); + virtual ~FtpDirectoryListingParserMlsd(); // FtpDirectoryListingParser methods: virtual FtpServerType GetServerType() const { return SERVER_MLSD; } diff --git a/net/ftp/ftp_directory_listing_parser_netware.cc b/net/ftp/ftp_directory_listing_parser_netware.cc index 3cd0c8f..ab7fb6d 100644 --- a/net/ftp/ftp_directory_listing_parser_netware.cc +++ b/net/ftp/ftp_directory_listing_parser_netware.cc @@ -40,6 +40,8 @@ FtpDirectoryListingParserNetware::FtpDirectoryListingParserNetware( current_time_(current_time) { } +FtpDirectoryListingParserNetware::~FtpDirectoryListingParserNetware() {} + bool FtpDirectoryListingParserNetware::ConsumeLine(const string16& line) { if (!received_first_line_) { received_first_line_ = true; diff --git a/net/ftp/ftp_directory_listing_parser_netware.h b/net/ftp/ftp_directory_listing_parser_netware.h index e05b55d..5fdcd84 100644 --- a/net/ftp/ftp_directory_listing_parser_netware.h +++ b/net/ftp/ftp_directory_listing_parser_netware.h @@ -20,6 +20,7 @@ class FtpDirectoryListingParserNetware : public FtpDirectoryListingParser { // date strings, |current_time| will be used. This allows passing a specific // date during testing. explicit FtpDirectoryListingParserNetware(const base::Time& current_time); + virtual ~FtpDirectoryListingParserNetware(); // FtpDirectoryListingParser methods: virtual FtpServerType GetServerType() const { return SERVER_NETWARE; } diff --git a/net/ftp/ftp_directory_listing_parser_vms.cc b/net/ftp/ftp_directory_listing_parser_vms.cc index 3702a14..ed12665 100644 --- a/net/ftp/ftp_directory_listing_parser_vms.cc +++ b/net/ftp/ftp_directory_listing_parser_vms.cc @@ -168,6 +168,8 @@ FtpDirectoryListingParserVms::FtpDirectoryListingParserVms() last_is_directory_(false) { } +FtpDirectoryListingParserVms::~FtpDirectoryListingParserVms() {} + bool FtpDirectoryListingParserVms::ConsumeLine(const string16& line) { switch (state_) { case STATE_INITIAL: diff --git a/net/ftp/ftp_directory_listing_parser_vms.h b/net/ftp/ftp_directory_listing_parser_vms.h index 1b1f082..12f8dc7 100644 --- a/net/ftp/ftp_directory_listing_parser_vms.h +++ b/net/ftp/ftp_directory_listing_parser_vms.h @@ -16,6 +16,7 @@ namespace net { class FtpDirectoryListingParserVms : public FtpDirectoryListingParser { public: FtpDirectoryListingParserVms(); + virtual ~FtpDirectoryListingParserVms(); // FtpDirectoryListingParser methods: virtual FtpServerType GetServerType() const { return SERVER_VMS; } diff --git a/net/ftp/ftp_directory_listing_parser_windows.cc b/net/ftp/ftp_directory_listing_parser_windows.cc index d2bbdaa..e3211739 100644 --- a/net/ftp/ftp_directory_listing_parser_windows.cc +++ b/net/ftp/ftp_directory_listing_parser_windows.cc @@ -72,8 +72,9 @@ bool WindowsDateListingToTime(const std::vector<string16>& columns, namespace net { -FtpDirectoryListingParserWindows::FtpDirectoryListingParserWindows() { -} +FtpDirectoryListingParserWindows::FtpDirectoryListingParserWindows() {} + +FtpDirectoryListingParserWindows::~FtpDirectoryListingParserWindows() {} bool FtpDirectoryListingParserWindows::ConsumeLine(const string16& line) { std::vector<string16> columns; diff --git a/net/ftp/ftp_directory_listing_parser_windows.h b/net/ftp/ftp_directory_listing_parser_windows.h index cf869c3..91ffe36 100644 --- a/net/ftp/ftp_directory_listing_parser_windows.h +++ b/net/ftp/ftp_directory_listing_parser_windows.h @@ -15,6 +15,7 @@ namespace net { class FtpDirectoryListingParserWindows : public FtpDirectoryListingParser { public: FtpDirectoryListingParserWindows(); + virtual ~FtpDirectoryListingParserWindows(); // FtpDirectoryListingParser methods: virtual FtpServerType GetServerType() const { return SERVER_WINDOWS; } diff --git a/net/ftp/ftp_network_session.cc b/net/ftp/ftp_network_session.cc new file mode 100644 index 0000000..65dd218 --- /dev/null +++ b/net/ftp/ftp_network_session.cc @@ -0,0 +1,15 @@ +// 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. + +#include "net/ftp/ftp_network_session.h" + +namespace net { + +FtpNetworkSession::FtpNetworkSession(HostResolver* host_resolver) + : host_resolver_(host_resolver) {} + +FtpNetworkSession::~FtpNetworkSession() {} + +} // namespace net + diff --git a/net/ftp/ftp_network_session.h b/net/ftp/ftp_network_session.h index 3eab4ff..b53b5c0 100644 --- a/net/ftp/ftp_network_session.h +++ b/net/ftp/ftp_network_session.h @@ -16,8 +16,7 @@ class HostResolver; // This class holds session objects used by FtpNetworkTransaction objects. class FtpNetworkSession : public base::RefCounted<FtpNetworkSession> { public: - explicit FtpNetworkSession(HostResolver* host_resolver) - : host_resolver_(host_resolver) {} + explicit FtpNetworkSession(HostResolver* host_resolver); HostResolver* host_resolver() { return host_resolver_; } FtpAuthCache* auth_cache() { return &auth_cache_; } @@ -25,7 +24,7 @@ class FtpNetworkSession : public base::RefCounted<FtpNetworkSession> { private: friend class base::RefCounted<FtpNetworkSession>; - ~FtpNetworkSession() {} + virtual ~FtpNetworkSession(); HostResolver* const host_resolver_; FtpAuthCache auth_cache_; |