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

Side by Side Diff: chrome/browser/prefs/pref_value_map.cc

Issue 5794003: Deinline even more destructors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/prefs/pref_value_map.h ('k') | chrome/browser/prefs/value_map_pref_store.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/prefs/pref_value_map.h" 5 #include "chrome/browser/prefs/pref_value_map.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/scoped_ptr.h" 8 #include "base/scoped_ptr.h"
9 #include "base/stl_util-inl.h" 9 #include "base/stl_util-inl.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 11
12 PrefValueMap::PrefValueMap() {}
13
12 PrefValueMap::~PrefValueMap() { 14 PrefValueMap::~PrefValueMap() {
13 Clear(); 15 Clear();
14 } 16 }
15 17
16 bool PrefValueMap::GetValue(const std::string& key, Value** value) const { 18 bool PrefValueMap::GetValue(const std::string& key, Value** value) const {
17 const Map::const_iterator entry = prefs_.find(key); 19 const Map::const_iterator entry = prefs_.find(key);
18 if (entry != prefs_.end()) { 20 if (entry != prefs_.end()) {
19 if (value) 21 if (value)
20 *value = entry->second; 22 *value = entry->second;
21 return true; 23 return true;
(...skipping 26 matching lines...) Expand all
48 return true; 50 return true;
49 } 51 }
50 52
51 return false; 53 return false;
52 } 54 }
53 55
54 void PrefValueMap::Clear() { 56 void PrefValueMap::Clear() {
55 STLDeleteValues(&prefs_); 57 STLDeleteValues(&prefs_);
56 prefs_.clear(); 58 prefs_.clear();
57 } 59 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/pref_value_map.h ('k') | chrome/browser/prefs/value_map_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698