Index: chrome/browser/chromeos/gdata/gdata_parser.h |
diff --git a/chrome/browser/chromeos/gdata/gdata_parser.h b/chrome/browser/chromeos/gdata/gdata_parser.h |
index ff5f24ada88ebdd088b6a7e3ae30bdf5ea1ebf60..b6a79f1ea9d740ad1c2e9a412c048cdaef0e3298 100644 |
--- a/chrome/browser/chromeos/gdata/gdata_parser.h |
+++ b/chrome/browser/chromeos/gdata/gdata_parser.h |
@@ -62,8 +62,10 @@ class Link { |
EMBED, |
PRODUCT, |
ICON, |
+ OPEN_WITH, |
}; |
Link(); |
+ ~Link(); |
// Registers the mapping between JSON field names and the members in |
// this class. |
@@ -81,19 +83,30 @@ class Link { |
// Title of the link. |
const string16& title() const { return title_; } |
+ // For OPEN_WITH links, this contains the application ID. For all other link |
+ // types, it is the empty string. |
+ const std::string& app_id() const { return app_id_; } |
+ |
// Link MIME type. |
const std::string& mime_type() const { return mime_type_; } |
private: |
friend class DocumentEntry; |
- // Converts value of link.rel into LinkType. Outputs to |result| and |
- // returns true when |rel| has a valid value. Otherwise does nothing |
- // and returns false. |
- static bool GetLinkType(const base::StringPiece& rel, LinkType* result); |
+ // Converts value of link.rel into LinkType. Outputs to |type| and returns |
+ // true when |rel| has a valid value. Otherwise does nothing and returns |
+ // false. |
+ static bool GetLinkType(const base::StringPiece& rel, LinkType* type); |
+ |
+ // Converts value of link.rel to application ID, if there is one embedded in |
+ // the link.rel field. Outputs to |app_id| and returns true when |rel| has a |
+ // valid value. Otherwise does nothing and returns false. |
+ static bool GetAppID(const base::StringPiece& rel, std::string* app_id); |
+ |
LinkType type_; |
GURL href_; |
string16 title_; |
+ std::string app_id_; |
std::string mime_type_; |
DISALLOW_COPY_AND_ASSIGN(Link); |