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

Unified Diff: webkit/glue/feed.h

Issue 46055: RSS feed support (part 1), 2nd attempt (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 | « chrome/test/test_location_bar.h ('k') | webkit/glue/webframe.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/feed.h
===================================================================
--- webkit/glue/feed.h (revision 0)
+++ webkit/glue/feed.h (revision 0)
@@ -0,0 +1,46 @@
+// Copyright (c) 2009 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.
+
+#ifndef CHROME_COMMON_FEED_H_
+#define CHROME_COMMON_FEED_H_
+
+#include <string>
+#include <vector>
+
+#include "base/ref_counted.h"
+#include "googleurl/src/gurl.h"
+
+struct FeedItem {
+ // The feed title.
+ std::wstring title;
+ // The feed type, for example: "application/rss+xml". The type can be blank.
+ std::wstring type;
+ // The URL to subscribe to the feed.
+ GURL url;
+};
+
+class FeedList : public base::RefCounted<FeedList> {
+ public:
+ // We limit the number of feeds that can be sent so that a rouge renderer
+ // doesn't cause excessive memory usage in the browser process by specifying
+ // a huge number of RSS feeds for the browser to parse.
+ static const size_t kMaxFeeds = 50;
+
+ FeedList() {}
+
+ void Add(const FeedItem &item) {
+ list_.push_back(item);
+ }
+
+ const std::vector<FeedItem>& list() const {
+ return list_;
+ }
+
+ private:
+ std::vector<FeedItem> list_;
+
+ DISALLOW_COPY_AND_ASSIGN(FeedList);
+};
+
+#endif // CHROME_COMMON_FEED_H_
Property changes on: webkit\glue\feed.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/test/test_location_bar.h ('k') | webkit/glue/webframe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698