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

Side by Side Diff: base/values.cc

Issue 10825273: Clean-up inline members of nested classes (base/) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sixth time's the charm Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/values.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/values.h" 5 #include "base/values.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/float_util.h" 9 #include "base/float_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 // All other cases: Make a copy and hook it up. 743 // All other cases: Make a copy and hook it up.
744 SetWithoutPathExpansion(*key, merge_value->DeepCopy()); 744 SetWithoutPathExpansion(*key, merge_value->DeepCopy());
745 } 745 }
746 } 746 }
747 } 747 }
748 748
749 void DictionaryValue::Swap(DictionaryValue* other) { 749 void DictionaryValue::Swap(DictionaryValue* other) {
750 dictionary_.swap(other->dictionary_); 750 dictionary_.swap(other->dictionary_);
751 } 751 }
752 752
753 DictionaryValue::key_iterator::key_iterator(ValueMap::const_iterator itr) {
754 itr_ = itr;
755 }
756
757 DictionaryValue::key_iterator::key_iterator(const key_iterator& rhs) {
758 itr_ = rhs.itr_;
759 }
760
761 DictionaryValue::Iterator::Iterator(const DictionaryValue& target)
762 : target_(target),
763 it_(target.dictionary_.begin()) {}
764
753 DictionaryValue* DictionaryValue::DeepCopy() const { 765 DictionaryValue* DictionaryValue::DeepCopy() const {
754 DictionaryValue* result = new DictionaryValue; 766 DictionaryValue* result = new DictionaryValue;
755 767
756 for (ValueMap::const_iterator current_entry(dictionary_.begin()); 768 for (ValueMap::const_iterator current_entry(dictionary_.begin());
757 current_entry != dictionary_.end(); ++current_entry) { 769 current_entry != dictionary_.end(); ++current_entry) {
758 result->SetWithoutPathExpansion(current_entry->first, 770 result->SetWithoutPathExpansion(current_entry->first,
759 current_entry->second->DeepCopy()); 771 current_entry->second->DeepCopy());
760 } 772 }
761 773
762 return result; 774 return result;
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 if (lhs_it != end() || rhs_it != other_list->end()) 1051 if (lhs_it != end() || rhs_it != other_list->end())
1040 return false; 1052 return false;
1041 1053
1042 return true; 1054 return true;
1043 } 1055 }
1044 1056
1045 ValueSerializer::~ValueSerializer() { 1057 ValueSerializer::~ValueSerializer() {
1046 } 1058 }
1047 1059
1048 } // namespace base 1060 } // namespace base
OLDNEW
« no previous file with comments | « base/values.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698