Chromium Code Reviews| Index: third_party/libaddressinput/chromium/util/json.h |
| diff --git a/third_party/libaddressinput/chromium/util/json.h b/third_party/libaddressinput/chromium/util/json.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..421fef98384f1e39c249397a0d8b351218c47794 |
| --- /dev/null |
| +++ b/third_party/libaddressinput/chromium/util/json.h |
| @@ -0,0 +1,39 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_UTIL_JSON_H_ |
| +#define THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_UTIL_JSON_H_ |
| + |
| +#include "base/basictypes.h" |
| +#include "base/memory/scoped_ptr.h" |
| +#include "base/values.h" |
| + |
| +namespace i18n { |
| +namespace addressinput { |
| + |
| +// This class provides the same interface as ../src/cpp/src/util/json.h but with |
|
please use gerrit instead
2013/11/20 00:03:10
Move this comment at the top of the file:
// Copy
|
| +// a Chromium-specific JSON parser. This is because it didn't make much sense to |
| +// have 2 JSON parsers in Chrome's code base, and the standalone library opted |
| +// to use rapidjson instead of jsoncpp. See the other file for an explanation of |
| +// what this class does. |
| + |
| +class Json { |
| + public: |
| + Json(); |
| + ~Json(); |
| + |
| + bool ParseObject(const std::string& json); |
|
please use gerrit instead
2013/11/20 00:03:10
Include-what-you-use specifies that you should #in
|
| + bool HasStringValueForKey(const std::string& key) const; |
| + std::string GetStringValueForKey(const std::string& key) const; |
| + |
| + private: |
| + scoped_ptr<base::DictionaryValue> dict_; |
|
please use gerrit instead
2013/11/20 00:03:10
You can forward-declare this and avoid including "
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(Json); |
| +}; |
| + |
| +} // namespace addressinput |
| +} // namespace i18n |
| + |
| +#endif // THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_UTIL_JSON_H_ |