Roll Chrome into Mojo.
This roll corresponds to:
https://chromium.googlesource.com/chromium/src/+/d3cf92cac313434de99ae66f6e3e12d27ab536ef
GN now requires python_binary_module to be undefined rather than an empty string.
Context lines in cc_strip_video.patch changed.
Minor edits were required for sky:
Change to Skia header file organization.
SkRect::intersect now warns if ignored.
BUG=https://code.google.com/p/chromium/issues/detail?id=401761
R=jamesr@chromium.org
Review URL: https://codereview.chromium.org/839143002
diff --git a/base/values.cc b/base/values.cc
index 5d45ec3..b478b62 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -371,7 +371,7 @@
dictionary_.clear();
}
-void DictionaryValue::Set(const std::string& path, Value* in_value) {
+void DictionaryValue::Set(const std::string& path, scoped_ptr<Value> in_value) {
DCHECK(IsStringUTF8(path));
DCHECK(in_value);
@@ -392,7 +392,11 @@
current_path.erase(0, delimiter_position + 1);
}
- current_dictionary->SetWithoutPathExpansion(current_path, in_value);
+ current_dictionary->SetWithoutPathExpansion(current_path, in_value.Pass());
+}
+
+void DictionaryValue::Set(const std::string& path, Value* in_value) {
+ Set(path, make_scoped_ptr(in_value));
}
void DictionaryValue::SetBoolean(const std::string& path, bool in_value) {
@@ -418,18 +422,24 @@
}
void DictionaryValue::SetWithoutPathExpansion(const std::string& key,
- Value* in_value) {
+ scoped_ptr<Value> in_value) {
+ Value* bare_ptr = in_value.release();
// If there's an existing value here, we need to delete it, because
// we own all our children.
std::pair<ValueMap::iterator, bool> ins_res =
- dictionary_.insert(std::make_pair(key, in_value));
+ dictionary_.insert(std::make_pair(key, bare_ptr));
if (!ins_res.second) {
- DCHECK_NE(ins_res.first->second, in_value); // This would be bogus
+ DCHECK_NE(ins_res.first->second, bare_ptr); // This would be bogus
delete ins_res.first->second;
- ins_res.first->second = in_value;
+ ins_res.first->second = bare_ptr;
}
}
+void DictionaryValue::SetWithoutPathExpansion(const std::string& key,
+ Value* in_value) {
+ SetWithoutPathExpansion(key, make_scoped_ptr(in_value));
+}
+
void DictionaryValue::SetBooleanWithoutPathExpansion(
const std::string& path, bool in_value) {
SetWithoutPathExpansion(path, new FundamentalValue(in_value));