diff options
author | vmpstr <vmpstr@chromium.org> | 2016-02-25 16:55:10 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-26 00:57:20 +0000 |
commit | e3448945f36b47122cd8972314796e395a19b3ad (patch) | |
tree | 110f953991091d52d5a35a345658a7ec1ab270ae /google_apis | |
parent | a5967e556ac4e68e15037b3f89c6902924c53579 (diff) | |
download | chromium_src-e3448945f36b47122cd8972314796e395a19b3ad.zip chromium_src-e3448945f36b47122cd8972314796e395a19b3ad.tar.gz chromium_src-e3448945f36b47122cd8972314796e395a19b3ad.tar.bz2 |
google_apis: Add out-of-line copy ctors for complex classes.
This patch adds out of line copy constructors for classes that our
clang-plugin considers heavy. This is an effort to enable copy
constructor checks by default.
BUG=436357
R=rogerta@chromium.org, dcheng@chromium.org, thakis@chromium.org
Review URL: https://codereview.chromium.org/1727063003
Cr-Commit-Position: refs/heads/master@{#377739}
Diffstat (limited to 'google_apis')
22 files changed, 49 insertions, 0 deletions
diff --git a/google_apis/drive/drive_api_parser.cc b/google_apis/drive/drive_api_parser.cc index 579f166..b0e4152 100644 --- a/google_apis/drive/drive_api_parser.cc +++ b/google_apis/drive/drive_api_parser.cc @@ -430,6 +430,8 @@ bool ParentReference::Parse(const base::Value& value) { FileResource::FileResource() : shared_(false), file_size_(kUnsetFileSize) {} +FileResource::FileResource(const FileResource& other) = default; + FileResource::~FileResource() {} // static diff --git a/google_apis/drive/drive_api_parser.h b/google_apis/drive/drive_api_parser.h index b6734e5..39aeaa5 100644 --- a/google_apis/drive/drive_api_parser.h +++ b/google_apis/drive/drive_api_parser.h @@ -433,6 +433,7 @@ class FileResource { }; FileResource(); + FileResource(const FileResource& other); ~FileResource(); // Registers the mapping between JSON field names and the members in this diff --git a/google_apis/gaia/fake_gaia.cc b/google_apis/gaia/fake_gaia.cc index 82c366b..d2b0f28 100644 --- a/google_apis/gaia/fake_gaia.cc +++ b/google_apis/gaia/fake_gaia.cc @@ -127,6 +127,9 @@ void SetCookies(BasicHttpResponse* http_response, FakeGaia::AccessTokenInfo::AccessTokenInfo() : expires_in(3600) {} +FakeGaia::AccessTokenInfo::AccessTokenInfo(const AccessTokenInfo& other) = + default; + FakeGaia::AccessTokenInfo::~AccessTokenInfo() {} FakeGaia::MergeSessionParams::MergeSessionParams() { diff --git a/google_apis/gaia/fake_gaia.h b/google_apis/gaia/fake_gaia.h index 10de8f6..75109c5 100644 --- a/google_apis/gaia/fake_gaia.h +++ b/google_apis/gaia/fake_gaia.h @@ -37,6 +37,7 @@ class FakeGaia { // Access token details used for token minting and the token info endpoint. struct AccessTokenInfo { AccessTokenInfo(); + AccessTokenInfo(const AccessTokenInfo& other); ~AccessTokenInfo(); std::string token; diff --git a/google_apis/gaia/fake_oauth2_token_service.cc b/google_apis/gaia/fake_oauth2_token_service.cc index 55b5cd5..2b25e11 100644 --- a/google_apis/gaia/fake_oauth2_token_service.cc +++ b/google_apis/gaia/fake_oauth2_token_service.cc @@ -7,6 +7,9 @@ FakeOAuth2TokenService::PendingRequest::PendingRequest() { } +FakeOAuth2TokenService::PendingRequest::PendingRequest( + const PendingRequest& other) = default; + FakeOAuth2TokenService::PendingRequest::~PendingRequest() { } diff --git a/google_apis/gaia/fake_oauth2_token_service.h b/google_apis/gaia/fake_oauth2_token_service.h index 9d9cc18..17a4e26 100644 --- a/google_apis/gaia/fake_oauth2_token_service.h +++ b/google_apis/gaia/fake_oauth2_token_service.h @@ -50,6 +50,7 @@ class FakeOAuth2TokenService : public OAuth2TokenService { private: struct PendingRequest { PendingRequest(); + PendingRequest(const PendingRequest& other); ~PendingRequest(); std::string account_id; diff --git a/google_apis/gaia/gaia_auth_consumer.cc b/google_apis/gaia/gaia_auth_consumer.cc index 860b66e..1a15c98 100644 --- a/google_apis/gaia/gaia_auth_consumer.cc +++ b/google_apis/gaia/gaia_auth_consumer.cc @@ -19,6 +19,9 @@ GaiaAuthConsumer::ClientLoginResult::ClientLoginResult( data(new_data), two_factor(false) {} +GaiaAuthConsumer::ClientLoginResult::ClientLoginResult( + const ClientLoginResult& other) = default; + GaiaAuthConsumer::ClientLoginResult::~ClientLoginResult() {} bool GaiaAuthConsumer::ClientLoginResult::operator==( diff --git a/google_apis/gaia/gaia_auth_consumer.h b/google_apis/gaia/gaia_auth_consumer.h index 242e58d..3b87d01 100644 --- a/google_apis/gaia/gaia_auth_consumer.h +++ b/google_apis/gaia/gaia_auth_consumer.h @@ -27,6 +27,7 @@ class GaiaAuthConsumer { const std::string& new_lsid, const std::string& new_token, const std::string& new_data); + ClientLoginResult(const ClientLoginResult& other); ~ClientLoginResult(); bool operator==(const ClientLoginResult &b) const; diff --git a/google_apis/gaia/gaia_auth_util.cc b/google_apis/gaia/gaia_auth_util.cc index f7eed9a..93d9863 100644 --- a/google_apis/gaia/gaia_auth_util.cc +++ b/google_apis/gaia/gaia_auth_util.cc @@ -47,6 +47,8 @@ std::string CanonicalizeEmailImpl(const std::string& email_address, ListedAccount::ListedAccount() {} +ListedAccount::ListedAccount(const ListedAccount& other) = default; + ListedAccount::~ListedAccount() {} bool ListedAccount::operator==(const ListedAccount& other) const { diff --git a/google_apis/gaia/gaia_auth_util.h b/google_apis/gaia/gaia_auth_util.h index 5e75645..564f207 100644 --- a/google_apis/gaia/gaia_auth_util.h +++ b/google_apis/gaia/gaia_auth_util.h @@ -23,6 +23,7 @@ struct ListedAccount { bool valid; ListedAccount(); + ListedAccount(const ListedAccount& other); ~ListedAccount(); bool operator==(const ListedAccount& other) const; }; diff --git a/google_apis/gaia/google_service_auth_error.cc b/google_apis/gaia/google_service_auth_error.cc index 76f4122..34c94c1 100644 --- a/google_apis/gaia/google_service_auth_error.cc +++ b/google_apis/gaia/google_service_auth_error.cc @@ -23,6 +23,8 @@ GoogleServiceAuthError::Captcha::Captcha( image_width(width), image_height(height) { } +GoogleServiceAuthError::Captcha::Captcha(const Captcha& other) = default; + GoogleServiceAuthError::Captcha::~Captcha() { } @@ -45,6 +47,9 @@ GoogleServiceAuthError::SecondFactor::SecondFactor( field_length(length) { } +GoogleServiceAuthError::SecondFactor::SecondFactor(const SecondFactor& other) = + default; + GoogleServiceAuthError::SecondFactor::~SecondFactor() { } @@ -86,6 +91,9 @@ GoogleServiceAuthError::GoogleServiceAuthError( error_message_(error_message) { } +GoogleServiceAuthError::GoogleServiceAuthError( + const GoogleServiceAuthError& other) = default; + // static GoogleServiceAuthError GoogleServiceAuthError::FromConnectionError(int error) { diff --git a/google_apis/gaia/google_service_auth_error.h b/google_apis/gaia/google_service_auth_error.h index 15db61c..9549ad7 100644 --- a/google_apis/gaia/google_service_auth_error.h +++ b/google_apis/gaia/google_service_auth_error.h @@ -102,6 +102,7 @@ class GoogleServiceAuthError { const GURL& unlock, int width, int height); + Captcha(const Captcha& other); ~Captcha(); // For test only. bool operator==(const Captcha &b) const; @@ -121,6 +122,7 @@ class GoogleServiceAuthError { const std::string& prompt, const std::string& alternate, int length); + SecondFactor(const SecondFactor& other); ~SecondFactor(); // For test only. bool operator==(const SecondFactor &b) const; @@ -144,6 +146,8 @@ class GoogleServiceAuthError { // Construct a GoogleServiceAuthError from a State with no additional data. explicit GoogleServiceAuthError(State s); + GoogleServiceAuthError(const GoogleServiceAuthError& other); + // Construct a GoogleServiceAuthError from a network error. // It will be created with CONNECTION_FAILED set. static GoogleServiceAuthError FromConnectionError(int error); diff --git a/google_apis/gaia/oauth2_mint_token_flow.cc b/google_apis/gaia/oauth2_mint_token_flow.cc index f8e662f..3a41b8e 100644 --- a/google_apis/gaia/oauth2_mint_token_flow.cc +++ b/google_apis/gaia/oauth2_mint_token_flow.cc @@ -96,6 +96,8 @@ static GoogleServiceAuthError CreateAuthError(const net::URLFetcher* source) { } // namespace IssueAdviceInfoEntry::IssueAdviceInfoEntry() {} +IssueAdviceInfoEntry::IssueAdviceInfoEntry(const IssueAdviceInfoEntry& other) = + default; IssueAdviceInfoEntry::~IssueAdviceInfoEntry() {} bool IssueAdviceInfoEntry::operator ==(const IssueAdviceInfoEntry& rhs) const { @@ -117,6 +119,8 @@ OAuth2MintTokenFlow::Parameters::Parameters( mode(mode_arg) { } +OAuth2MintTokenFlow::Parameters::Parameters(const Parameters& other) = default; + OAuth2MintTokenFlow::Parameters::~Parameters() {} OAuth2MintTokenFlow::OAuth2MintTokenFlow(Delegate* delegate, diff --git a/google_apis/gaia/oauth2_mint_token_flow.h b/google_apis/gaia/oauth2_mint_token_flow.h index 7d1b645..1871cea 100644 --- a/google_apis/gaia/oauth2_mint_token_flow.h +++ b/google_apis/gaia/oauth2_mint_token_flow.h @@ -44,6 +44,7 @@ class URLRequestContextGetter; struct IssueAdviceInfoEntry { public: IssueAdviceInfoEntry(); + IssueAdviceInfoEntry(const IssueAdviceInfoEntry& other); ~IssueAdviceInfoEntry(); base::string16 description; @@ -81,6 +82,7 @@ class OAuth2MintTokenFlow : public OAuth2ApiCallFlow { const std::vector<std::string>& scopes_arg, const std::string& device_id, Mode mode_arg); + Parameters(const Parameters& other); ~Parameters(); std::string extension_id; diff --git a/google_apis/gaia/oauth2_token_service.cc b/google_apis/gaia/oauth2_token_service.cc index ed20d13..e146ca9 100644 --- a/google_apis/gaia/oauth2_token_service.cc +++ b/google_apis/gaia/oauth2_token_service.cc @@ -35,6 +35,9 @@ OAuth2TokenService::RequestParameters::RequestParameters( scopes(scopes) { } +OAuth2TokenService::RequestParameters::RequestParameters( + const RequestParameters& other) = default; + OAuth2TokenService::RequestParameters::~RequestParameters() { } diff --git a/google_apis/gaia/oauth2_token_service.h b/google_apis/gaia/oauth2_token_service.h index dad12ea..41ca725 100644 --- a/google_apis/gaia/oauth2_token_service.h +++ b/google_apis/gaia/oauth2_token_service.h @@ -298,6 +298,7 @@ class OAuth2TokenService : public base::NonThreadSafe { RequestParameters(const std::string& client_id, const std::string& account_id, const ScopeSet& scopes); + RequestParameters(const RequestParameters& other); ~RequestParameters(); bool operator<(const RequestParameters& params) const; diff --git a/google_apis/gcm/base/mcs_message.cc b/google_apis/gcm/base/mcs_message.cc index 8673426..b14c751 100644 --- a/google_apis/gcm/base/mcs_message.cc +++ b/google_apis/gcm/base/mcs_message.cc @@ -54,6 +54,8 @@ MCSMessage::MCSMessage(uint8_t tag, DCHECK_EQ(tag, GetMCSProtoTag(core_->Get())); } +MCSMessage::MCSMessage(const MCSMessage& other) = default; + MCSMessage::~MCSMessage() { } diff --git a/google_apis/gcm/base/mcs_message.h b/google_apis/gcm/base/mcs_message.h index 5be4aef..a5d327a 100644 --- a/google_apis/gcm/base/mcs_message.h +++ b/google_apis/gcm/base/mcs_message.h @@ -38,6 +38,7 @@ class GCM_EXPORT MCSMessage { // |tag| must match |protobuf|'s message type. Takes ownership of |protobuf|. MCSMessage(uint8_t tag, scoped_ptr<const google::protobuf::MessageLite> protobuf); + MCSMessage(const MCSMessage& other); ~MCSMessage(); // Returns whether this message is valid or not (whether a protobuf was diff --git a/google_apis/gcm/engine/account_mapping.cc b/google_apis/gcm/engine/account_mapping.cc index 57f8b80..411d177 100644 --- a/google_apis/gcm/engine/account_mapping.cc +++ b/google_apis/gcm/engine/account_mapping.cc @@ -64,6 +64,8 @@ bool StringToStatus(const std::string& status_str, AccountMapping::AccountMapping() : status(NEW) { } +AccountMapping::AccountMapping(const AccountMapping& other) = default; + AccountMapping::~AccountMapping() { } diff --git a/google_apis/gcm/engine/account_mapping.h b/google_apis/gcm/engine/account_mapping.h index ffed95c..bfd25a7 100644 --- a/google_apis/gcm/engine/account_mapping.h +++ b/google_apis/gcm/engine/account_mapping.h @@ -27,6 +27,7 @@ struct GCM_EXPORT AccountMapping { }; AccountMapping(); + AccountMapping(const AccountMapping& other); ~AccountMapping(); // Serializes account mapping to string without |account_id|, |status| or diff --git a/google_apis/gcm/engine/checkin_request.cc b/google_apis/gcm/engine/checkin_request.cc index 5d47f7b..4ddcc8b 100644 --- a/google_apis/gcm/engine/checkin_request.cc +++ b/google_apis/gcm/engine/checkin_request.cc @@ -91,6 +91,8 @@ CheckinRequest::RequestInfo::RequestInfo( settings_digest(settings_digest), chrome_build_proto(chrome_build_proto) {} +CheckinRequest::RequestInfo::RequestInfo(const RequestInfo& other) = default; + CheckinRequest::RequestInfo::~RequestInfo() {} CheckinRequest::CheckinRequest( diff --git a/google_apis/gcm/engine/checkin_request.h b/google_apis/gcm/engine/checkin_request.h index f77e66d..d8767a2 100644 --- a/google_apis/gcm/engine/checkin_request.h +++ b/google_apis/gcm/engine/checkin_request.h @@ -46,6 +46,7 @@ class GCM_EXPORT CheckinRequest : public net::URLFetcherDelegate { const std::map<std::string, std::string>& account_tokens, const std::string& settings_digest, const checkin_proto::ChromeBuildProto& chrome_build_proto); + RequestInfo(const RequestInfo& other); ~RequestInfo(); // Android ID of the device. |