summaryrefslogtreecommitdiffstats
path: root/base/values.cc
Commit message (Collapse)AuthorAgeFilesLines
* Value::GetAsDictionarybattre@chromium.org2011-11-261-0/+20
| | | | | | | | | | BUG=none TEST=no Review URL: http://codereview.chromium.org/8701002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111623 0039d316-1c4b-4281-b951-d872f2087c98
* Make DictionaryValue::SetWithoutPathExpansion more efficient.grt@chromium.org2011-10-211-5/+6
| | | | | | | | | | | | | SetWithoutPathExpansion is now always O(log N) rather than O(2 log N) for new insertions and O(3 log N) for replacements. A simple test shows the expected 66% speedup in replacements. BUG=none TEST=base_unittests continues to pass R=jar@chromium.org Review URL: http://codereview.chromium.org/8374001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106801 0039d316-1c4b-4281-b951-d872f2087c98
* Adds Find method to the ListValue class.pastarmovj@chromium.org2011-09-191-0/+22
| | | | | | | | | | | | | This method makes working with lists easierand will be needed from the refactored signed settings code. BUG=chromium-os:14054 TEST=base_unittest --gtest_filter=ValuesTest.List Review URL: http://codereview.chromium.org/7892052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101741 0039d316-1c4b-4281-b951-d872f2087c98
* Revert recent changes to base::Valuestevenjb@google.com2011-08-261-25/+9
| | | | | | | | | | | | | | | | | | Reverts: 98223: base: Add AsList() function to Value API. 98266: base: Add AsBinary() function to Value API. There are two issues with these commits: 1. libcros uses base::Value to pass data to Chrome. It includes values.h from libchrome which contains its own copy. This is a terrible design flaw in libcros and is being addressed (http://crosbug.com/19576), however we need some time to address this before we can make these changes without breaking Chrome on ChromeOS. 2. AsList() and AsBinary() should be const. The fact that they were not const caused re-factoring that changed const Value& input arguments to Value*, which is against the spec. When we re-introduce this, these members should be made const. BUG=chromium-os:19604 TEST=Check bots + ChromeOS autotests Review URL: http://codereview.chromium.org/7753020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98378 0039d316-1c4b-4281-b951-d872f2087c98
* base: Add AsBinary() function to Value API.tfarina@chromium.org2011-08-251-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | This function should simplify some constructions. Instead of: if (!value->IsType(Value::TYPE_BINARY)) return false; BinaryValue* binary_value = static_cast<BinaryValue*>(value); You can do: BinaryValue* binary_value = value->AsBinary(); if (!binary_value) return false; BUG=None TEST=base_unittests --gtest_filter=Values* R=evan@chromium.org Review URL: http://codereview.chromium.org/7748017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98266 0039d316-1c4b-4281-b951-d872f2087c98
* base: Add AsList() function to Value API.tfarina@chromium.org2011-08-251-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | This function should simplify some constructions. Instead of: if (!value->IsType(Value::TYPE_LIST)) return false; ListValue* list_value = static_cast<ListValue*>(value); You can do: ListValue* list_value = value->AsList(); if (!list_value) return false; BUG=None TEST=base_unittests --gtest_filter=Values* R=evan@chromium.org,tony@chromium.org Review URL: http://codereview.chromium.org/7714004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98223 0039d316-1c4b-4281-b951-d872f2087c98
* Reverts debugging code added in hopes of tracking crash. This alsosky@chromium.org2011-08-241-9/+1
| | | | | | | | | | | | | | | reverts 97997 as it was only needed with this debugging code. I'm TBRing this as it's just a revert (well, two reverts). BUG=91396 TEST=none R=brettw@chromium.org,mnissler@chromium.org,ben@chromium.org TBR=brettw@chromium.org,mnissler@chromium.org,ben@chromium.org Review URL: http://codereview.chromium.org/7714038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98115 0039d316-1c4b-4281-b951-d872f2087c98
* Remove check_on_delete for ChromeOS to avoid change to sizeof(Value)satorux@chromium.org2011-08-241-1/+8
| | | | | | | | | BUG=chromium-os:19577 TEST=chrome compiles on all platforms Review URL: http://codereview.chromium.org/7714024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97997 0039d316-1c4b-4281-b951-d872f2087c98
* base: Map non-finite double Values to 0.0.derat@chromium.org2011-08-231-2/+5
| | | | | | | | | | | | | | | NaN and positive/negative infinity can't be represented in JSON. I previously added a DCHECK(), but think it also makes sense to do something with the values in release builds so they can't leave profiles unreadable. BUG=chromium-os:73856 TEST=none Review URL: http://codereview.chromium.org/7708008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97816 0039d316-1c4b-4281-b951-d872f2087c98
* Adds some debugging code in hopes of figuring out a crash. As far as Isky@chromium.org2011-08-231-1/+2
| | | | | | | | | | | | | | | can tell the crash is occurring because prefs has a Value that has been deleted so that when we go to update the Value we crash. I only enabled the debugging code for non-incognito prefs. If it turns out the crashes are in incognito-prefs, I'll update that next. BUG=91396 TEST=none R=brettw@chromium.org,bauerb@chromium.org,ben@chromium.org Review URL: http://codereview.chromium.org/7698004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97815 0039d316-1c4b-4281-b951-d872f2087c98
* base: Add DCHECK that double Values are finite.derat@chromium.org2011-08-171-0/+3
| | | | | | | | | | | | | | JSON doesn't support NaN or positive/negative infinity. I'm hoping that this DCHECK will slightly increase the odds that bugs are caught before they start corrupting pref files. BUG=73856 TEST=none Review URL: http://codereview.chromium.org/7646032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97111 0039d316-1c4b-4281-b951-d872f2087c98
* base: Fix the TODO in ListValue::Remove().tfarina@chromium.org2011-08-131-8/+6
| | | | | | | | | | | | | Change the return type of Remove() to bool, and add a size_t output parameter. BUG=None TEST=None R=evan@chromium.org Review URL: http://codereview.chromium.org/7618021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96702 0039d316-1c4b-4281-b951-d872f2087c98
* base: Rename ValueType to something less redundant as _just_ Type.tfarina@chromium.org2011-08-121-1/+1
| | | | | | | | | | | | | | | | | | | So instead of: base::Value::ValueType We write a nice: base::Value::Type BUG=None TEST=None R=evan@chromium.org Review URL: http://codereview.chromium.org/7634018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96614 0039d316-1c4b-4281-b951-d872f2087c98
* base: Remove CreateBinaryValue() function as it's redundant.tfarina@chromium.org2011-08-111-5/+0
| | | | | | | | | | | | | | It does the same thing of BinaryValue::Create(), it's more verbose, and used only in unittest. BUG=None TEST=None R=evan@chromium.org Review URL: http://codereview.chromium.org/7623017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96413 0039d316-1c4b-4281-b951-d872f2087c98
* base: Remove unnecessary using declarations from values.htfarina@chromium.org2011-08-041-0/+4
| | | | | | | | | | | BUG=None TEST=None R=evan@chromium.org Review URL: http://codereview.chromium.org/7572032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95538 0039d316-1c4b-4281-b951-d872f2087c98
* Explicitly ShutdownOnUIThread the HostContentSettingsMap when destroying the ↵bauerb@chromium.org2011-07-121-0/+10
| | | | | | | | | | | | Profile. Also, get rid of Profile dependencies while we're at it. BUG=88037,88557 Review URL: http://codereview.chromium.org/7218073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92128 0039d316-1c4b-4281-b951-d872f2087c98
* Modified Value::GetAsDouble so the function returns true when the object ↵yusukes@google.com2011-05-021-1/+3
| | | | | | | | | | | | | | | holds an Integer. This should be useful when implementing an extension API in C++ since chrome.api.call(1.0); call in JS passes a Value of Integer to the C++ code while chrome.api.call(1.1); does a Value of Double. I'm working on this following Mihai's suggestion in http://codereview.chromium.org/6905053/. BUG=chromium-os:14421 TEST=ran try Review URL: http://codereview.chromium.org/6893089 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83705 0039d316-1c4b-4281-b951-d872f2087c98
* Let the method ListValue::AppendIfNotPresent always take ownership of the ↵markusheintz@chromium.org2011-03-181-2/+4
| | | | | | | | | | | |in_value|. In any cases. What is passed in get's owned. BUG=none TEST=none Review URL: http://codereview.chromium.org/6695019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78686 0039d316-1c4b-4281-b951-d872f2087c98
* Move FilePath <-> Value conversions into a separate file.bauerb@chromium.org2011-03-151-33/+0
| | | | | | | | | BUG=75276 TEST=none Review URL: http://codereview.chromium.org/6691011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78182 0039d316-1c4b-4281-b951-d872f2087c98
* Add MoveToThread method to PrefMember to make it safe to read pref values ↵bauerb@chromium.org2011-02-211-0/+33
| | | | | | | | | | | from other threads. BUG=73385 TEST=PrefMemberTest.MoveToThread Review URL: http://codereview.chromium.org/6524041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75555 0039d316-1c4b-4281-b951-d872f2087c98
* Rename Real* to Double* in values.* and dependent filesarv@chromium.org2011-02-011-21/+21
| | | | | | | | | BUG=None TEST=Compiles and passes all tests Review URL: http://codereview.chromium.org/6248026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73232 0039d316-1c4b-4281-b951-d872f2087c98
* Made return types of various Value::DeepCopy() implementations more specificakalin@chromium.org2011-01-181-10/+10
| | | | | | | | | | | | | | | | | | Since C++ supports covariant return types, a subclass of Value can return its own pointer type for Value::DeepCopy(). Also made signatures of Value::Create*Value() more specific. Removed now-unnecessary casts. Added test for covariant return types. BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6324004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71617 0039d316-1c4b-4281-b951-d872f2087c98
* Make the order of methods in the cc files match the headers in base/.erg@google.com2011-01-071-52/+51
| | | | | | | | | BUG=68682 TEST=compiles Review URL: http://codereview.chromium.org/6189001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70771 0039d316-1c4b-4281-b951-d872f2087c98
* Handle policy refresh internally in ConfigurationPolicyPrefStore.mnissler@chromium.org2010-12-231-108/+0
| | | | | | | | | | | This removes the final bits of thread-switching madness from PrefValueStore and also makes sure only the PrefStores and PrefService instances that are actually affected by a policy change get reconfigured. BUG=67715 TEST=unit tests in configuration_policy_provider_unittest.cc Review URL: http://codereview.chromium.org/6074003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70050 0039d316-1c4b-4281-b951-d872f2087c98
* JavaScript to Value bridge.scottbyer@google.com2010-12-071-0/+10
| | | | | | | | | | | | Add more values that we can get back from JavaScript. Very useful for writing additional DOMUI browser test, and maybe in other cases as well. BUG=none TEST=RenderViewHostTest.ExecuteJavascriptInWebFrameNotifyResult Review URL: http://codereview.chromium.org/4924001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68416 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for Bug 50726 "Save extension list and "winning" prefs from extensions"bauerb@chromium.org2010-12-061-0/+7
| | | | | | | | | | | | | | | | | | | This is a redesign for http://codereview.chromium.org/4852002/ following discussions. The goal of this patch is to ensure that Chrome maintains the order in which extensions apply their preferences between restarts. This may be an issue if two extensions overwrite each others preferences. Furthermore, it ensures that preferences are persisted to disk between browser restarts. Therefore, previous settings are immediately available when the browser is restarted. A description of the design has been published https://docs.google.com/a/google.com/document/d/1E_HX_cUpET1gH2gDunGIU1EOywMM6FEOuVU6TlpnSwo/edit?hl=en for review and comments. - Sorry, accessible Google internally only. This CL requires http://codereview.chromium.org/5204006/ Contributed by battre@google.com BUG=50726 TEST=none Review URL: http://codereview.chromium.org/5213002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68355 0039d316-1c4b-4281-b951-d872f2087c98
* Chrome side of consolidating zoom code for pepper plugins (i.e. pdf) and the ↵jam@chromium.org2010-10-011-0/+9
| | | | | | | | rest of Chrome. Allows plugins to have different zoom ranges, and also to update zoom on its own. Review URL: http://codereview.chromium.org/3419023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61153 0039d316-1c4b-4281-b951-d872f2087c98
* Fix DictionaryValue::Equals() to also detect differences in key names.mnissler@chromium.org2010-08-181-1/+2
| | | | | | | | | BUG=52419 TEST=unit tests in values_unittest.cc Review URL: http://codereview.chromium.org/3163020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56536 0039d316-1c4b-4281-b951-d872f2087c98
* Remove remaining deprecated wstring methods from base/values.{cc,h}.viettrungluu@chromium.org2010-08-171-63/+0
| | | | | | | | | BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3109025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56362 0039d316-1c4b-4281-b951-d872f2087c98
* Remove deprecated wstring DictionaryValue ↵viettrungluu@chromium.org2010-08-171-36/+0
| | | | | | | | | | | Get{Boolean,Integer,Real,Binary,Dictionary,List}(). BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3187004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56302 0039d316-1c4b-4281-b951-d872f2087c98
* Remove deprecated wstring Get(As)String() methods from Value, etc.viettrungluu@chromium.org2010-08-161-43/+0
| | | | | | | | | BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3117017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56187 0039d316-1c4b-4281-b951-d872f2087c98
* Remove (deprecated) wstring version of Value::CreateStringValue().viettrungluu@chromium.org2010-08-151-9/+1
| | | | | | | | | BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3136012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56170 0039d316-1c4b-4281-b951-d872f2087c98
* Remove deprecated wstring DictionaryValue::SetWithoutPathExpansion().viettrungluu@chromium.org2010-08-141-6/+0
| | | | | | | | | BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3121017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56128 0039d316-1c4b-4281-b951-d872f2087c98
* Remove remaining deprecated wstring ↵viettrungluu@chromium.org2010-08-141-30/+0
| | | | | | | | | | | DictionaryValue::Get...WithoutPathExpansion()s. BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3116013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56124 0039d316-1c4b-4281-b951-d872f2087c98
* Remove deprecated DictionaryValue::HasKeyASCII(); HasKey() already takes UTF-8.viettrungluu@chromium.org2010-08-141-5/+0
| | | | | | | | | BUG=none TEST=builds and passes tests Review URL: http://codereview.chromium.org/3142011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56122 0039d316-1c4b-4281-b951-d872f2087c98
* Remove deprecated wstring ↵viettrungluu@chromium.org2010-08-141-13/+0
| | | | | | | | | | | DictionaryValue::Get{Dictionary,List}WithoutPathExpansion() overloads. BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3163015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56121 0039d316-1c4b-4281-b951-d872f2087c98
* Remove (deprecated) wstring version of ↵viettrungluu@chromium.org2010-08-131-6/+0
| | | | | | | | | | | | | DictionaryValue::RemoveWithoutPathExpansion(). (And convert the few remaining uses.) BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3163011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56031 0039d316-1c4b-4281-b951-d872f2087c98
* Add UTF-8 DCHECK()s in values.cc (since keys/paths are expected to be UTF-8).viettrungluu@chromium.org2010-08-061-0/+6
| | | | | | | | | BUG=23581 TEST=unit tests pass Review URL: http://codereview.chromium.org/3081018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55190 0039d316-1c4b-4281-b951-d872f2087c98
* Rename GetStringAsUTF16() to GetString() (and overload), etc.viettrungluu@chromium.org2010-08-041-24/+8
| | | | | | | | | | | | Also do some drive-by wstring/wchar_t -> string/char changes (in addition to the necessary ones). BUG=none TEST=builds and tests pass Review URL: http://codereview.chromium.org/3091005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54944 0039d316-1c4b-4281-b951-d872f2087c98
* Rename DictionaryValue's SetStringFromUTF16() to SetString() (and overload).viettrungluu@chromium.org2010-08-041-5/+7
| | | | | | | | | | | | | Also do a bunch of drive-by changes while I'm at it. Still to do: rename GetStringAsUTF16() to GetString(). BUG=none TEST=builds everywhere, tests pass Review URL: http://codereview.chromium.org/3033050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54915 0039d316-1c4b-4281-b951-d872f2087c98
* Add dictionary comparing functions to DictionaryValue and unit testsdanno@chromium.org2010-08-041-0/+108
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/3035045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54879 0039d316-1c4b-4281-b951-d872f2087c98
* Remove Value/StringValue's ...UTF16() methods in favour of overloading.viettrungluu@chromium.org2010-08-031-21/+31
| | | | | | | | | | | Still to do: do the same for DictionaryValue. BUG=none TEST=builds Review URL: http://codereview.chromium.org/3023037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54751 0039d316-1c4b-4281-b951-d872f2087c98
* Convert DictionaryValue's keys to std::string (from wstring).viettrungluu@chromium.org2010-07-301-70/+221
| | | | | | | | | | | | Everything now needs to be changed to avoid the deprecated wstring methods; this includes the unit tests. BUG=23581 TEST=all our tests still pass Review URL: http://codereview.chromium.org/3075010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54359 0039d316-1c4b-4281-b951-d872f2087c98
* Compress and checksum pending logs that are going to be persisted. Persisted ↵ziadh@chromium.org2010-07-191-1/+1
| | | | | | | | | | | | | | | | logs now have the following format: [list_size, log1, log2, ..., log_n, checksum]. where each log is bzipped before being written. Upon reading the logs from disk, we verify the data and register whether we faced corruptions or not. r=jar Review URL: http://codereview.chromium.org/2936005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52885 0039d316-1c4b-4281-b951-d872f2087c98
* Move implementation from header to source.erg@chromium.org2010-07-151-0/+25
| | | | | | | | | | | | | | | | | | | | This is an effort to speed up compile and link time, and also minimizing the size of the intermediary .o files on disk. For example, just moving the constructor/destructor from the classes in chrome/browser/pref_member.{cc,h} netted a 368k drop in total .o file size. In aggregate, this shrinks libbrowser.a by 10 megabytes, and a few odd megabytes on most other chrome .a files. A lot of this was done before I started harvesting what the most included symbols were across all of chrome's code. Most of them are in webkit, but there's plenty in base/ that are used everywhere to keep me busy for several patches to come. BUG=none TEST=none Review URL: http://codereview.chromium.org/3012001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52528 0039d316-1c4b-4281-b951-d872f2087c98
* Preference provider implementation backed by JSON files in a directory.mnissler@chromium.org2010-05-141-1/+21
| | | | | | | | | BUG=42412 TEST=Unit tests in chrome/browser/value_tree_policy_decoder.cc and base/values_unittest.cc Review URL: http://codereview.chromium.org/2027010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47269 0039d316-1c4b-4281-b951-d872f2087c98
* Add notifications to allow desktop notification permissions to be synced.zork@chromium.org2010-04-121-0/+10
| | | | | | | | | | | | | Fix a bug where sites can be added to allow and deny lists multiple times. BUG=none TEST=Open two browsers with separate profiles. Request permission for notifications on a site on one. Check that the permissions are the same on the other browser. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=44234 Review URL: http://codereview.chromium.org/1578023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44283 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 44234 - Add notifications to allow desktop notification permissions ↵zork@chromium.org2010-04-121-10/+0
| | | | | | | | | | | | | | | | to be synced. Fix a bug where sites can be added to allow and deny lists multiple times. BUG=none TEST=Open two browsers with separate profiles. Request permission for notifications on a site on one. Check that the permissions are the same on the other browser. Review URL: http://codereview.chromium.org/1578023 TBR=zork@chromium.org Review URL: http://codereview.chromium.org/1607012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44235 0039d316-1c4b-4281-b951-d872f2087c98
* Add notifications to allow desktop notification permissions to be synced.zork@chromium.org2010-04-121-0/+10
| | | | | | | | | | | Fix a bug where sites can be added to allow and deny lists multiple times. BUG=none TEST=Open two browsers with separate profiles. Request permission for notifications on a site on one. Check that the permissions are the same on the other browser. Review URL: http://codereview.chromium.org/1578023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44234 0039d316-1c4b-4281-b951-d872f2087c98
* Allowing MSI mode detection to work from the master preferences file. robertshield@chromium.org2010-03-221-1/+6
| | | | | | | | | | | | | | | | Refactor the piece of master preferences code that was in setup_util.h|cc (setup) into master_preferences.h|cc (install_util). This adds an install_util -> googleurl dependency, which should to be fine. Add in master_preferences_dummy.cc to keep the nacl64 stuff compiling happily. Add values.h|cc to the portion of base built in 64 bit mode and add a minor fix to values.cc to make it build. Also refactor accompanying master_preferences test code from setup tests to install_util tests. BUG=19370 Review URL: http://codereview.chromium.org/979003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42248 0039d316-1c4b-4281-b951-d872f2087c98