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

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

Issue 10834220: contacts: Only download contacts from "My Contacts" group. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge and apply review feedback Created 8 years, 4 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: chrome/browser/chromeos/gdata/gdata_operations.h
diff --git a/chrome/browser/chromeos/gdata/gdata_operations.h b/chrome/browser/chromeos/gdata/gdata_operations.h
index f04182e66c464436521bd2f314e57c5c7fa18b49..c0e46a1787cae82f19484da02b7dac4ae100ab78 100644
--- a/chrome/browser/chromeos/gdata/gdata_operations.h
+++ b/chrome/browser/chromeos/gdata/gdata_operations.h
@@ -373,12 +373,37 @@ class ResumeUploadOperation : public UrlFetchOperationBase {
DISALLOW_COPY_AND_ASSIGN(ResumeUploadOperation);
};
+//========================== GetContactGroupsOperation =========================
+
+// This class fetches a JSON feed containing a user's contact groups.
+class GetContactGroupsOperation : public GetDataOperation {
+ public:
+ GetContactGroupsOperation(GDataOperationRegistry* registry,
+ const GetDataCallback& callback);
+ virtual ~GetContactGroupsOperation();
+
+ void set_feed_url_for_testing(const GURL& url) {
+ feed_url_for_testing_ = url;
+ }
+
+ protected:
+ // Overridden from GetDataOperation.
+ virtual GURL GetURL() const OVERRIDE;
+
+ private:
+ // If non-empty, URL of the feed to fetch.
+ GURL feed_url_for_testing_;
+
+ DISALLOW_COPY_AND_ASSIGN(GetContactGroupsOperation);
+};
+
//============================ GetContactsOperation ============================
-// This class fetches a user's contacts.
+// This class fetches a JSON feed containing a user's contacts.
class GetContactsOperation : public GetDataOperation {
public:
GetContactsOperation(GDataOperationRegistry* registry,
+ const std::string& group_id,
const base::Time& min_update_time,
const GetDataCallback& callback);
virtual ~GetContactsOperation();
@@ -395,6 +420,11 @@ class GetContactsOperation : public GetDataOperation {
// If non-empty, URL of the feed to fetch.
GURL feed_url_for_testing_;
+ // If non-empty, contains the ID of the group whose contacts should be
+ // returned. Group IDs generally look like this:
+ // http://www.google.com/m8/feeds/groups/user%40gmail.com/base/6
+ std::string group_id_;
+
// If is_null() is false, contains a minimum last-updated time that will be
// used to filter contacts.
base::Time min_update_time_;
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_contacts_service_browsertest.cc ('k') | chrome/browser/chromeos/gdata/gdata_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698