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

Side by Side Diff: base/values.h

Issue 1120006: detect preferences errors (Closed)
Patch Set: changes from review Created 10 years, 8 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
« no previous file with comments | « base/json/json_reader_unittest.cc ('k') | chrome/browser/autocomplete/search_provider.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // This file specifies a recursive data storage class called Value 5 // This file specifies a recursive data storage class called Value
6 // intended for storing setting and other persistable data. 6 // intended for storing setting and other persistable data.
7 // It includes the ability to specify (recursive) lists and dictionaries, so 7 // It includes the ability to specify (recursive) lists and dictionaries, so
8 // it's fairly expressive. However, the API is optimized for the common case, 8 // it's fairly expressive. However, the API is optimized for the common case,
9 // namely storing a hierarchical tree of simple values. Given a 9 // namely storing a hierarchical tree of simple values. Given a
10 // DictionaryValue root, you can easily do things like: 10 // DictionaryValue root, you can easily do things like:
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 // This interface is implemented by classes that know how to serialize and 424 // This interface is implemented by classes that know how to serialize and
425 // deserialize Value objects. 425 // deserialize Value objects.
426 class ValueSerializer { 426 class ValueSerializer {
427 public: 427 public:
428 virtual ~ValueSerializer() {} 428 virtual ~ValueSerializer() {}
429 429
430 virtual bool Serialize(const Value& root) = 0; 430 virtual bool Serialize(const Value& root) = 0;
431 431
432 // This method deserializes the subclass-specific format into a Value object. 432 // This method deserializes the subclass-specific format into a Value object.
433 // If the return value is non-NULL, the caller takes ownership of returned 433 // If the return value is non-NULL, the caller takes ownership of returned
434 // Value. If the return value is NULL, and if error_message is non-NULL, 434 // Value. If the return value is NULL, and if error_code is non-NULL,
435 // error_message should be filled with a message describing the error. 435 // error_code will be set with the underlying error.
436 virtual Value* Deserialize(std::string* error_message) = 0; 436 // If |error_message| is non-null, it will be filled in with a formatted
437 // error message including the location of the error if appropriate.
438 virtual Value* Deserialize(int* error_code, std::string* error_str) = 0;
437 }; 439 };
438 440
439 #endif // BASE_VALUES_H_ 441 #endif // BASE_VALUES_H_
OLDNEW
« no previous file with comments | « base/json/json_reader_unittest.cc ('k') | chrome/browser/autocomplete/search_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698