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

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

Issue 140823005: [rac] Download country code data in a single HTTP request. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Temporarily switch to staging URL. Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/libaddressinput/chromium/cpp/src/util/json.h
diff --git a/third_party/libaddressinput/chromium/cpp/src/util/json.h b/third_party/libaddressinput/chromium/cpp/src/util/json.h
index d6405439f76e8af7b9a9d8126811c8d7f9b6d572..9af7f1cd0cbaddbf8d509d50ae0a27388675c1d4 100644
--- a/third_party/libaddressinput/chromium/cpp/src/util/json.h
+++ b/third_party/libaddressinput/chromium/cpp/src/util/json.h
@@ -40,12 +40,20 @@ class Json {
// object.
virtual bool ParseObject(const std::string& json) = 0;
- // Sets |value| to the string for |key| if it exists, or false if the key
- // doesn't exist or doesn't correspond to a string. The JSON object must be
- // parsed successfully in ParseObject() before invoking this method.
+ // Sets |value| to the string for |key| if it exists and has a string value.
+ // Returns false if the key doesn't exist or doesn't correspond to a string.
+ // The JSON object must be parsed successfully in ParseObject() before
+ // invoking this method.
virtual bool GetStringValueForKey(const std::string& key,
std::string* value) const = 0;
+ // Sets |value| to the dictionary for |key| if it exists and has a dictionary
+ // value. Returns false if the key doesn't exist or doesn't correspond to a
+ // dictionary. The JSON object must be parsed successfully in ParseObject()
+ // before invoking this method.
+ virtual bool GetJsonValueForKey(const std::string& key,
+ scoped_ptr<Json>* value) const = 0;
+
protected:
Json();
};
« no previous file with comments | « third_party/libaddressinput/chromium/cpp/src/rule.cc ('k') | third_party/libaddressinput/chromium/cpp/src/util/json.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698