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

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

Issue 390233003: Decrement CreateDoubleValue count (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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 | « no previous file | base/prefs/pref_value_map.cc » ('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 #ifndef BASE_PREFS_PREF_VALUE_MAP_H_ 5 #ifndef BASE_PREFS_PREF_VALUE_MAP_H_
6 #define BASE_PREFS_PREF_VALUE_MAP_H_ 6 #define BASE_PREFS_PREF_VALUE_MAP_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // Sets the value for |key| to the string |value|. 64 // Sets the value for |key| to the string |value|.
65 void SetString(const std::string& key, const std::string& value); 65 void SetString(const std::string& key, const std::string& value);
66 66
67 // Gets an int value for |key| and stores it in |value|. Returns true if 67 // Gets an int value for |key| and stores it in |value|. Returns true if
68 // the value was found and of the proper type. 68 // the value was found and of the proper type.
69 bool GetInteger(const std::string& key, int* value) const; 69 bool GetInteger(const std::string& key, int* value) const;
70 70
71 // Sets the value for |key| to the int |value|. 71 // Sets the value for |key| to the int |value|.
72 void SetInteger(const std::string& key, const int value); 72 void SetInteger(const std::string& key, const int value);
73 73
74 // Sets the value for |key| to the double |value|.
75 void SetDouble(const std::string& key, const double value);
76
74 // Compares this value map against |other| and stores all key names that have 77 // Compares this value map against |other| and stores all key names that have
75 // different values in |differing_keys|. This includes keys that are present 78 // different values in |differing_keys|. This includes keys that are present
76 // only in one of the maps. 79 // only in one of the maps.
77 void GetDifferingKeys(const PrefValueMap* other, 80 void GetDifferingKeys(const PrefValueMap* other,
78 std::vector<std::string>* differing_keys) const; 81 std::vector<std::string>* differing_keys) const;
79 82
80 private: 83 private:
81 typedef std::map<std::string, base::Value*> Map; 84 typedef std::map<std::string, base::Value*> Map;
82 85
83 Map prefs_; 86 Map prefs_;
84 87
85 DISALLOW_COPY_AND_ASSIGN(PrefValueMap); 88 DISALLOW_COPY_AND_ASSIGN(PrefValueMap);
86 }; 89 };
87 90
88 #endif // BASE_PREFS_PREF_VALUE_MAP_H_ 91 #endif // BASE_PREFS_PREF_VALUE_MAP_H_
OLDNEW
« no previous file with comments | « no previous file | base/prefs/pref_value_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698