summaryrefslogtreecommitdiffstats
path: root/base/values.cc
Commit message (Collapse)AuthorAgeFilesLines
* 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
* importer: use FilePath instead of wstring in some placesevan@chromium.org2010-02-191-0/+24
| | | | | | | | | | | Added API to DictionaryValue to use ASCII where appropriate. BUG=24672 TEST=profile import still got my bookmarks Review URL: http://codereview.chromium.org/647016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39441 0039d316-1c4b-4281-b951-d872f2087c98
* Add string16 methods to JSON value classes.munjal@chromium.org2010-01-151-0/+54
| | | | | | | | | TEST=none BUG=32013 Review URL: http://codereview.chromium.org/543031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36397 0039d316-1c4b-4281-b951-d872f2087c98
* Extensions: file handling clean up.estade@chromium.org2009-12-181-0/+8
| | | | | | | | | | | | | | | - remove various invalid uses of ASCII functions - properly escape resource requests - clean up file path handling Some work remains to be done on the last bullet point but this is enough to fix the bug. BUG=30509 TEST=see bug Review URL: http://codereview.chromium.org/501046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34923 0039d316-1c4b-4281-b951-d872f2087c98
* Remove emtpy lists and empty dictionaries from Preferences andtony@chromium.org2009-12-021-42/+99
| | | | | | | | | | Local State when writing to disk. BUG=28836 Review URL: http://codereview.chromium.org/449074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33518 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a memory leak when calling the one-arg form of ListValue::Remove().pkasting@chromium.org2009-11-301-0/+1
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/434108 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33314 0039d316-1c4b-4281-b951-d872f2087c98
* Try to fix spurious gcc warning.pkasting@chromium.org2009-11-251-2/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33112 0039d316-1c4b-4281-b951-d872f2087c98
* Many changes to DictionaryValues:pkasting@chromium.org2009-11-251-87/+142
| | | | | | | | | | | | | | | | | * Add support for keys with "." in them via new XXXWithoutPathExpansion() APIs. * Use these APIs with all key iterator usage. * SetXXX() calls cannot fail, so change them from bool to void. * Change GetSize() to size() since it's cheap, and add empty(). Other: * Use standard for loop format in more places (e.g. instead of while loops when they're really doing a for loop). * Shorten a few bits of code. BUG=567 TEST=none Review URL: http://codereview.chromium.org/441008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33109 0039d316-1c4b-4281-b951-d872f2087c98
* Copy the relevant parts of ICU to a new file base/third_party/icu/icu_utf.*brettw@chromium.org2009-10-071-1/+2
| | | | | | | | | | | | | | so we can do basic UTF8/16/32 conversions without linking all of ICU. Change callers who used to call SysUTF8ToWide/SysWideToUTF8 in base to using these new functions. I will remove the Sys versions of these functions in a later patch. TEST=none BUG=none Review URL: http://codereview.chromium.org/243102 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28219 0039d316-1c4b-4281-b951-d872f2087c98
* Modify extension request IPC messages to pass a ListValue instead of a string.mpcomplete@chromium.org2009-10-061-1/+2
| | | | | | | | | | | | This allows us to pass binary values through extension requests. I use this in my next CL to pass SkBitmaps. BUG=23269 TEST=no Review URL: http://codereview.chromium.org/251093 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28130 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Remove the check for index < 0 because index is a size_t and can ↵jhawkins@chromium.org2009-09-301-1/+1
| | | | | | | | | | | never be < 0. CID=6072 BUG=none TEST=none Review URL: http://codereview.chromium.org/243052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27659 0039d316-1c4b-4281-b951-d872f2087c98
* Landing tfarina patch. See http://codereview.chromium.org/195040/showjcampan@chromium.org2009-09-141-2/+2
| | | | | | | | | | Fix some styles issues reported by lint in base\values.h. BUG=None TEST=None Review URL: http://codereview.chromium.org/200112 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26113 0039d316-1c4b-4281-b951-d872f2087c98
* override chrome:// URLs via extensions.erikkay@chromium.org2009-08-281-2/+13
| | | | | | | | | | Overrides are declared in an extension's manifest. The last one installed wins. However, we keep a list of those installed per page so that priority is preserved and so that uninstall will revert to a previous state. Review URL: http://codereview.chromium.org/174277 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24791 0039d316-1c4b-4281-b951-d872f2087c98
* Implement the popup blocking whitelist pref. This makes the whitelist ↵pkasting@chromium.org2009-05-091-14/+14
| | | | | | | | actually function.BUG=11440 Review URL: http://codereview.chromium.org/115149 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15702 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGEdeanm@chromium.org2009-03-101-1/+0
| | | | | | | | | Normalize end of file newlines in base/. All files end in a single newline. Review URL: http://codereview.chromium.org/42011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11329 0039d316-1c4b-4281-b951-d872f2087c98
* revert broken change 10833nsylvain@chromium.org2009-03-031-36/+34
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10837 0039d316-1c4b-4281-b951-d872f2087c98
* Port DictionaryValue to use string16 instead of wstring.dsh@google.com2009-03-031-34/+36
| | | | | | | Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=10818 Review URL: http://codereview.chromium.org/31014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10833 0039d316-1c4b-4281-b951-d872f2087c98
* Revert dsh's change 10818nsylvain@chromium.org2009-03-031-36/+34
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10821 0039d316-1c4b-4281-b951-d872f2087c98
* Port DictionaryValue to use string16 instead of wstring.dsh@google.com2009-03-031-34/+36
| | | | | | Review URL: http://codereview.chromium.org/31014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10818 0039d316-1c4b-4281-b951-d872f2087c98
* Flesh out ListValue class.aa@chromium.org2009-01-201-3/+58
| | | | | | Review URL: http://codereview.chromium.org/18200 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8315 0039d316-1c4b-4281-b951-d872f2087c98
* Added std::string to Value via Set/GetString overloading.scherkus@chromium.org2008-12-111-2/+43
| | | | | | | | | | All input is converted to UTF-8. Output is converted back to wide during std::wstring version of GetString(). This is part one of some more patches to come where I switch clients over to UTF-8 strings. Review URL: http://codereview.chromium.org/13230 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6768 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Added std::string to Value via Set/GetString overloading."scherkus@chromium.org2008-12-101-39/+3
| | | | | | Review URL: http://codereview.chromium.org/13358 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6747 0039d316-1c4b-4281-b951-d872f2087c98
* Added std::string to Value via Set/GetString overloading.scherkus@chromium.org2008-12-101-3/+39
| | | | | | | | | | All input is converted to UTF-8. Output is converted back to wide during std::wstring version of GetString(). This is part one of some more patches to come where I switch clients over to UTF-8 strings. Review URL: http://codereview.chromium.org/13230 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6740 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98