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

Side by Side 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: simplify gyp 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_UTIL_JSON_H_
6 #define THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_UTIL_JSON_H_
7
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/values.h"
11
12 namespace i18n {
13 namespace addressinput {
14
15 // This class provides the same interface as ../src/cpp/src/util/json.h but with
16 // a Chromium-specific JSON parser. This is because it didn't make much sense to
17 // have 2 JSON parsers in Chrome's code base, and the standalone library opted
18 // to use rapidjson instead of jsoncpp. See the other file for an explanation of
19 // what this class does.
20
21 class Json {
22 public:
23 Json();
24 ~Json();
25
26 bool ParseObject(const std::string& json);
27 bool HasStringValueForKey(const std::string& key) const;
28 std::string GetStringValueForKey(const std::string& key) const;
29
30 private:
31 scoped_ptr<base::DictionaryValue> dict_;
32
33 DISALLOW_COPY_AND_ASSIGN(Json);
34 };
35
36 } // namespace addressinput
37 } // namespace i18n
38
39 #endif // THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_UTIL_JSON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698