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

Unified Diff: third_party/libaddressinput/chromium/util/json.h

Issue 68323005: Build libaddressinput in Chrome for requestAutocomplete(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/libaddressinput/README.chromium ('k') | third_party/libaddressinput/chromium/util/json.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..43be272d3361cd047be32362140c03e8a16d5652
--- /dev/null
+++ b/third_party/libaddressinput/chromium/util/json.h
@@ -0,0 +1,41 @@
+// 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.
+//
+// This class provides the same interface as ../src/cpp/src/util/json.h but with
+// 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.
+
+#ifndef THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_UTIL_JSON_H_
+#define THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_UTIL_JSON_H_
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/values.h"
+
+namespace i18n {
+namespace addressinput {
+
+class Json {
+ public:
+ Json();
+ ~Json();
+
+ bool ParseObject(const std::string& json);
+ bool HasStringValueForKey(const std::string& key) const;
+ std::string GetStringValueForKey(const std::string& key) const;
+
+ private:
+ scoped_ptr<base::DictionaryValue> dict_;
+
+ DISALLOW_COPY_AND_ASSIGN(Json);
+};
+
+} // namespace addressinput
+} // namespace i18n
+
+#endif // THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_UTIL_JSON_H_
« no previous file with comments | « third_party/libaddressinput/README.chromium ('k') | third_party/libaddressinput/chromium/util/json.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698