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

Unified Diff: chromeos/network/onc/onc_merger.cc

Issue 1556773002: Convert Pass()→std::move() in //chromeos (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/network/onc/onc_mapper.cc ('k') | chromeos/network/onc/onc_normalizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/onc/onc_merger.cc
diff --git a/chromeos/network/onc/onc_merger.cc b/chromeos/network/onc/onc_merger.cc
index 16629201168e1aa8776979196980d42edc329bde..dab1d2db3d1d1ff17776e325ee8ac50f6784ba4e 100644
--- a/chromeos/network/onc/onc_merger.cc
+++ b/chromeos/network/onc/onc_merger.cc
@@ -6,6 +6,7 @@
#include <set>
#include <string>
+#include <utility>
#include <vector>
#include "base/logging.h"
@@ -77,7 +78,7 @@ DictionaryPtr GetEditableFlags(const base::DictionaryValue& policy) {
result_editable->SetWithoutPathExpansion(
it.key(), GetEditableFlags(*child_policy).release());
}
- return result_editable.Pass();
+ return result_editable;
}
// This is the base class for merging a list of DictionaryValues in
@@ -123,7 +124,7 @@ class MergeListOfDictionaries {
}
DictionaryPtr merged_dict(MergeNestedDictionaries(key, nested_dicts));
if (!merged_dict->empty())
- merged_value = merged_dict.Pass();
+ merged_value = std::move(merged_dict);
} else {
std::vector<const base::Value*> values;
for (DictPtrs::const_iterator it_inner = dicts.begin();
@@ -140,7 +141,7 @@ class MergeListOfDictionaries {
result->SetWithoutPathExpansion(key, merged_value.release());
}
}
- return result.Pass();
+ return result;
}
protected:
@@ -397,7 +398,7 @@ class MergeToAugmented : public MergeToEffective {
<< "Values do not match: " << key
<< " Effective: " << *effective_value;
// Return the un-augmented field.
- return effective_value.Pass();
+ return effective_value;
}
if (values.active_setting) {
// Unmanaged networks have assigned (active) values.
@@ -454,7 +455,7 @@ class MergeToAugmented : public MergeToEffective {
}
if (augmented_value->empty())
augmented_value.reset();
- return augmented_value.Pass();
+ return std::move(augmented_value);
}
// MergeListOfDictionaries override.
@@ -475,7 +476,7 @@ class MergeToAugmented : public MergeToEffective {
} else {
result = MergeToEffective::MergeNestedDictionaries(key, dicts);
}
- return result.Pass();
+ return result;
}
private:
« no previous file with comments | « chromeos/network/onc/onc_mapper.cc ('k') | chromeos/network/onc/onc_normalizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698