diff options
author | dcheng <dcheng@chromium.org> | 2015-12-27 18:24:50 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-28 02:26:02 +0000 |
commit | e486004502c17ab80953ef324926a536b8030d1e (patch) | |
tree | 9f51129a18a65823dfa8242491756a0697ea274a /third_party/libaddressinput | |
parent | 03b487d118b5b1c0e5651a889cc56b443ba1d526 (diff) | |
download | chromium_src-e486004502c17ab80953ef324926a536b8030d1e.zip chromium_src-e486004502c17ab80953ef324926a536b8030d1e.tar.gz chromium_src-e486004502c17ab80953ef324926a536b8030d1e.tar.bz2 |
Global conversion of Pass()→std::move() on OS==linux
❆(੭ु ◜◡‾)੭ु⁾☃❆
BUG=557422
R=avi@chromium.org
TBR=jam@chromium.org
Review URL: https://codereview.chromium.org/1550693002
Cr-Commit-Position: refs/heads/master@{#366956}
Diffstat (limited to 'third_party/libaddressinput')
4 files changed, 14 insertions, 13 deletions
diff --git a/third_party/libaddressinput/chromium/chrome_address_validator_unittest.cc b/third_party/libaddressinput/chromium/chrome_address_validator_unittest.cc index 54559a4..a7f9861 100644 --- a/third_party/libaddressinput/chromium/chrome_address_validator_unittest.cc +++ b/third_party/libaddressinput/chromium/chrome_address_validator_unittest.cc @@ -5,8 +5,8 @@ #include "third_party/libaddressinput/chromium/chrome_address_validator.h" #include <stddef.h> - #include <string> +#include <utility> #include <vector> #include "base/macros.h" @@ -740,12 +740,11 @@ class FailingAddressValidatorTest : public testing::Test, LoadRulesListener { class TestAddressValidator : public AddressValidator { public: // Takes ownership of |source| and |storage|. - TestAddressValidator( - scoped_ptr< ::i18n::addressinput::Source> source, - scoped_ptr< ::i18n::addressinput::Storage> storage, - LoadRulesListener* load_rules_listener) - : AddressValidator(source.Pass(), - storage.Pass(), + TestAddressValidator(scoped_ptr<::i18n::addressinput::Source> source, + scoped_ptr<::i18n::addressinput::Storage> storage, + LoadRulesListener* load_rules_listener) + : AddressValidator(std::move(source), + std::move(storage), load_rules_listener) {} virtual ~TestAddressValidator() {} diff --git a/third_party/libaddressinput/chromium/chrome_metadata_source.cc b/third_party/libaddressinput/chromium/chrome_metadata_source.cc index df7fce7..57c5acd 100644 --- a/third_party/libaddressinput/chromium/chrome_metadata_source.cc +++ b/third_party/libaddressinput/chromium/chrome_metadata_source.cc @@ -4,6 +4,8 @@ #include "third_party/libaddressinput/chromium/chrome_metadata_source.h" +#include <utility> + #include "base/logging.h" #include "base/macros.h" #include "base/memory/scoped_ptr.h" @@ -83,9 +85,7 @@ void ChromeMetadataSource::OnURLFetchComplete(const net::URLFetcher* source) { ChromeMetadataSource::Request::Request(const std::string& key, scoped_ptr<net::URLFetcher> fetcher, const Callback& callback) - : key(key), - fetcher(fetcher.Pass()), - callback(callback) {} + : key(key), fetcher(std::move(fetcher)), callback(callback) {} void ChromeMetadataSource::Download(const std::string& key, const Callback& downloaded) { @@ -101,7 +101,7 @@ void ChromeMetadataSource::Download(const std::string& key, net::LOAD_DO_NOT_SEND_COOKIES | net::LOAD_DO_NOT_SAVE_COOKIES); fetcher->SetRequestContext(getter_); - Request* request = new Request(key, fetcher.Pass(), downloaded); + Request* request = new Request(key, std::move(fetcher), downloaded); request->fetcher->SaveResponseWithWriter( scoped_ptr<net::URLFetcherResponseWriter>( new UnownedStringWriter(&request->data))); diff --git a/third_party/libaddressinput/chromium/chrome_storage_impl.cc b/third_party/libaddressinput/chromium/chrome_storage_impl.cc index 3798d81..d85a2fd 100644 --- a/third_party/libaddressinput/chromium/chrome_storage_impl.cc +++ b/third_party/libaddressinput/chromium/chrome_storage_impl.cc @@ -4,6 +4,8 @@ #include "third_party/libaddressinput/chromium/chrome_storage_impl.h" +#include <utility> + #include "base/memory/scoped_ptr.h" #include "base/prefs/writeable_pref_store.h" #include "base/values.h" @@ -25,7 +27,7 @@ void ChromeStorageImpl::Put(const std::string& key, std::string* data) { scoped_ptr<base::StringValue> string_value( new base::StringValue(std::string())); string_value->GetString()->swap(*owned_data); - backing_store_->SetValue(key, string_value.Pass(), + backing_store_->SetValue(key, std::move(string_value), WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); } diff --git a/third_party/libaddressinput/chromium/json.cc b/third_party/libaddressinput/chromium/json.cc index 897b491c..b7a7293 100644 --- a/third_party/libaddressinput/chromium/json.cc +++ b/third_party/libaddressinput/chromium/json.cc @@ -36,7 +36,7 @@ namespace { else result.reset(static_cast<const base::DictionaryValue*>(parsed.release())); - return result.Pass(); + return std::move(result); } } // namespace |