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

Side by Side Diff: base/prefs/pref_value_map.cc

Issue 851503003: Update from https://crrev.com/311076 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « base/posix/global_descriptors.cc ('k') | base/process/launch.h » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/prefs/pref_value_map.h" 5 #include "base/prefs/pref_value_map.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 delete entry->second; 60 delete entry->second;
61 prefs_.erase(entry); 61 prefs_.erase(entry);
62 return true; 62 return true;
63 } 63 }
64 64
65 return false; 65 return false;
66 } 66 }
67 67
68 void PrefValueMap::Clear() { 68 void PrefValueMap::Clear() {
69 STLDeleteValues(&prefs_); 69 STLDeleteValues(&prefs_);
70 prefs_.clear();
71 } 70 }
72 71
73 void PrefValueMap::Swap(PrefValueMap* other) { 72 void PrefValueMap::Swap(PrefValueMap* other) {
74 prefs_.swap(other->prefs_); 73 prefs_.swap(other->prefs_);
75 } 74 }
76 75
77 PrefValueMap::iterator PrefValueMap::begin() { 76 PrefValueMap::iterator PrefValueMap::begin() {
78 return prefs_.begin(); 77 return prefs_.begin();
79 } 78 }
80 79
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 ++other_pref; 146 ++other_pref;
148 } 147 }
149 } 148 }
150 149
151 // Add the remaining entries. 150 // Add the remaining entries.
152 for ( ; this_pref != prefs_.end(); ++this_pref) 151 for ( ; this_pref != prefs_.end(); ++this_pref)
153 differing_keys->push_back(this_pref->first); 152 differing_keys->push_back(this_pref->first);
154 for ( ; other_pref != other->prefs_.end(); ++other_pref) 153 for ( ; other_pref != other->prefs_.end(); ++other_pref)
155 differing_keys->push_back(other_pref->first); 154 differing_keys->push_back(other_pref->first);
156 } 155 }
OLDNEW
« no previous file with comments | « base/posix/global_descriptors.cc ('k') | base/process/launch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698