summaryrefslogtreecommitdiffstats
path: root/base/json
Commit message (Collapse)AuthorAgeFilesLines
* base/json: Get rid of static initializer in JSONReader.tfarina@chromium.org2011-09-012-24/+27
| | | | | | | | | | | | | | | Convert kInvalidToken to a static function in Token class called CreateInvalidToken(). This should get rid of the problem with the static initialization. BUG=94925 TEST=base_unittests --gtest_filter=JSON* R=tony@chromium.org Review URL: http://codereview.chromium.org/7756022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99200 0039d316-1c4b-4281-b951-d872f2087c98
* base/json: Get rid of an old TODO that doesn't apply anymore.tfarina@chromium.org2011-08-301-3/+0
| | | | | | | | | | | | | | The issue seems to be fixed as the ctor of JSONReader is public and there is a public static Read() function. BUG=None TEST=None R=aa@chromium.org,tony@chromium.org Review URL: http://codereview.chromium.org/7794003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98854 0039d316-1c4b-4281-b951-d872f2087c98
* Revert recent changes to base::Valuestevenjb@google.com2011-08-261-10/+10
| | | | | | | | | | | | | | | | | | 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 AsList() function to Value API.tfarina@chromium.org2011-08-251-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* base/json: Don't use static variables of user-defined type (i.e, std::wstring).tfarina@chromium.org2011-08-192-19/+17
| | | | | | | | | | | | | Instead use plain wchar_t array. BUG=83856 TEST=None R=tony@chromium.org Review URL: http://codereview.chromium.org/7624057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97458 0039d316-1c4b-4281-b951-d872f2087c98
* Rename BASE_API to BASE_EXPORT.darin@chromium.org2011-08-053-13/+13
| | | | | | | R=rvargas Review URL: http://codereview.chromium.org/7461141 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95618 0039d316-1c4b-4281-b951-d872f2087c98
* Move base/values.h into the base namespace. This includes a cros DEPS rolldmazzoni@chromium.org2011-07-122-4/+4
| | | | | | | | | | with a minor change to that code since libcros also uses base/values.h. BUG=88666 TEST=none Review URL: http://codereview.chromium.org/7259019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92208 0039d316-1c4b-4281-b951-d872f2087c98
* iwyu: Include stringprintf.h where appropriate, part 1.jhawkins@chromium.org2011-05-103-5/+7
| | | | | | | | | | | BUG=82098 TEST=none R=thakis@chromium.org Review URL: http://codereview.chromium.org/6997006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84754 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-282-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* Base: A few more files using BASE_API (for base.dll)rvargas@google.com2011-03-243-12/+15
| | | | | | | | BUG=76996 TEST=none Review URL: http://codereview.chromium.org/6729002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79303 0039d316-1c4b-4281-b951-d872f2087c98
* Rename Real* to Double* in values.* and dependent filesarv@chromium.org2011-02-014-42/+42
| | | | | | | | | 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
* Order function definitions in base/ according to the header.erg@google.com2011-01-112-30/+30
| | | | | | | | | BUG=68682 TEST=compiles Review URL: http://codereview.chromium.org/6085015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70975 0039d316-1c4b-4281-b951-d872f2087c98
* Start sorting methods in class declarations.erg@google.com2011-01-071-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | A lot of our headers are a mess and aren't organized. Impose the following order on files in the base/ directory: class Blah { each public/protected/private section: typedefs; enums; static constants; ctors; dtors; methods; overridden virtual methods; data members; }; BUG=68682 TEST=compiles Review URL: http://codereview.chromium.org/6081007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70749 0039d316-1c4b-4281-b951-d872f2087c98
* Remove remaining deprecated wstring methods from base/values.{cc,h}.viettrungluu@chromium.org2010-08-171-3/+3
| | | | | | | | | 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 Get(As)String() methods from Value, etc.viettrungluu@chromium.org2010-08-161-9/+11
| | | | | | | | | 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-1/+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-142-7/+7
| | | | | | | | | 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 deprecated wstring ↵viettrungluu@chromium.org2010-08-141-12/+12
| | | | | | | | | | | 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
* base: Add HexDigitToInt function to string_util.htfarina@chromium.org2010-07-311-19/+7
| | | | | | | | | | | | | Removed duplicated HexToInt functions and converted the callers along the way. BUG=None TEST=trybots and out/Debug/base_unittests --gtest_filter=StringUtilTest.HexDigitToInt Signed-off-by: Thiago Farina <tfarina@chromium.org> Review URL: http://codereview.chromium.org/2836069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54473 0039d316-1c4b-4281-b951-d872f2087c98
* Convert DictionaryValue's keys to std::string (from wstring).viettrungluu@chromium.org2010-07-302-6/+8
| | | | | | | | | | | | 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
* Move the number conversions from string_util to a new file.brettw@chromium.org2010-07-302-2/+4
| | | | | | | | | | | | | Use the base namespace in the new file. Update callers. I removed all wstring variants and also the string->number ones that ignore the return value. That encourages people to write code and forget about error handling. TEST=included unit tests BUG=none Review URL: http://codereview.chromium.org/3056029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54355 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-263-0/+3
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* detect preferences errorserikkay@chromium.org2010-04-063-51/+133
| | | | | | | | | BUG=38352 TEST=none Review URL: http://codereview.chromium.org/1120006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43715 0039d316-1c4b-4281-b951-d872f2087c98
* Improve the underlying escaping function JsonDoubleQuoteT to escape < and > ↵inferno@chromium.org2010-04-062-3/+6
| | | | | | | | | | characters BY DEFAULT to prevent script execution. BUG=40147 TEST=StringEscapeTest.* Review URL: http://codereview.chromium.org/1512013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43695 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for interacting with the DOM in browser_tests.kkania@chromium.org2010-03-182-1/+18
| | | | | | | | | BUG=none TEST=none Reivew url: http://codereview.chromium.org/660046 Review URL: http://codereview.chromium.org/1051005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42026 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 41789 - Add support for DOM interaction in browser tests via C++.kkania@chromium.org2010-03-172-18/+1
| | | | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/660046 TBR=kkania@chromium.org Review URL: http://codereview.chromium.org/971004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41807 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for DOM interaction in browser tests via C++.kkania@chromium.org2010-03-172-1/+18
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/660046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41789 0039d316-1c4b-4281-b951-d872f2087c98
* base: string_util.h -> utf_string_conversions.h fix.jhawkins@chromium.org2010-03-091-4/+3
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/678001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40972 0039d316-1c4b-4281-b951-d872f2087c98
* Remove gtest_prod.h include from JSONReader.derat@chromium.org2010-01-211-1/+6
| | | | | | | | | | | | | I'd like to build this code for Chrome OS, but the gtest include path is different there. I'm removing the include and adding the FRIEND_TEST() macro directly to json_reader.h. BUG=none TEST=compiled Review URL: http://codereview.chromium.org/546100 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36775 0039d316-1c4b-4281-b951-d872f2087c98
* Many changes to DictionaryValues:pkasting@chromium.org2009-11-254-19/+64
| | | | | | | | | | | | | | | | | * 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
* Submitting change from http://codereview.chromium.org/276029/showmad@chromium.org2009-11-032-2/+8
| | | | | | | | BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30778 0039d316-1c4b-4281-b951-d872f2087c98
* Move the json-related files into a separate json directory. This hopefully alsobrettw@chromium.org2009-10-239-0/+1912
makes the naming of string_escape more clear (it's actually JSON-specific). Move the files into the base namespace. TEST=none BUG=none Review URL: http://codereview.chromium.org/316016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29934 0039d316-1c4b-4281-b951-d872f2087c98