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

Unified Diff: base/values.cc

Issue 10035042: Rewrite base::JSONReader to be 35-40% faster, depending on the input string. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really fix Windows, address comments Created 8 years, 7 months 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 | « base/values.h ('k') | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/values.cc
diff --git a/base/values.cc b/base/values.cc
index 8d7ca351d1e9cc6db28489f822a9f341906f04b5..ee84fc6c0ef90e3217b845f4e703fff9265418d7 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -694,6 +694,10 @@ void DictionaryValue::MergeDictionary(const DictionaryValue* dictionary) {
}
}
+void DictionaryValue::Swap(DictionaryValue* other) {
+ dictionary_.swap(other->dictionary_);
+}
+
DictionaryValue* DictionaryValue::DeepCopy() const {
DictionaryValue* result = new DictionaryValue;
@@ -908,6 +912,10 @@ ListValue::const_iterator ListValue::Find(const Value& value) const {
return std::find_if(list_.begin(), list_.end(), ValueEquals(&value));
}
+void ListValue::Swap(ListValue* other) {
+ list_.swap(other->list_);
+}
+
bool ListValue::GetAsList(ListValue** out_value) {
if (out_value)
*out_value = this;
« no previous file with comments | « base/values.h ('k') | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698