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

Unified Diff: chrome/browser/chromeos/contacts/contact_source.h

Issue 10542076: ABANDONED: chromeos: Download contacts (work in progress). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor changes Created 8 years, 5 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/contacts/contact_source.h
diff --git a/chrome/browser/chromeos/contacts/contact_source.h b/chrome/browser/chromeos/contacts/contact_source.h
new file mode 100644
index 0000000000000000000000000000000000000000..63c0a5d7b4da8c23d659c13b0f30e415f4f749d8
--- /dev/null
+++ b/chrome/browser/chromeos/contacts/contact_source.h
@@ -0,0 +1,43 @@
+// Copyright (c) 2012 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_BROWSER_CHROMEOS_CONTACTS_CONTACT_SOURCE_H_
+#define CHROME_BROWSER_CHROMEOS_CONTACTS_CONTACT_SOURCE_H_
+
+#include <string>
+#include <vector>
+
+#include "base/basictypes.h"
+
+namespace contacts {
+
+struct Contact;
+typedef std::vector<const Contact*> ContactPointers;
+class ContactSourceObserver;
+
+// Interface for classes that provide contacts.
+class ContactSource {
+ public:
+ ContactSource() {}
+ virtual ~ContactSource() {}
+
+ // Appends the source's contacts to |contacts_out|.
+ virtual void AppendContacts(ContactPointers* contacts_out) = 0;
+
+ // Returns the contact identified by |provider_id|.
+ // NULL is returned if the contact doesn't exist.
+ virtual const Contact* GetContactByProviderId(
+ const std::string& provider_id) = 0;
+
+ // Adds or removes an observer.
+ virtual void AddObserver(ContactSourceObserver* observer) = 0;
+ virtual void RemoveObserver(ContactSourceObserver* observer) = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ContactSource);
+};
+
+} // namespace contacts
+
+#endif // CHROME_BROWSER_CHROMEOS_CONTACTS_CONTACT_SOURCE_H_

Powered by Google App Engine
This is Rietveld 408576698