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

Unified Diff: chrome/browser/chromeos/gdata/gdata_parser.h

Issue 10546034: Adds parsing for the app_id field from an "open-with-" link (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added json test Created 8 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a7871bd07015111afdc2698e540b90971180e26b 100644
--- a/chrome/browser/chromeos/gdata/gdata_parser.h
+++ b/chrome/browser/chromeos/gdata/gdata_parser.h
@@ -62,6 +62,7 @@ class Link {
EMBED,
PRODUCT,
ICON,
+ OPEN_WITH,
};
Link();
@@ -81,19 +82,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);
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698