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

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

Issue 190063004: chromeos: Delete old, unused contacts code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge again Created 6 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
Index: chrome/browser/chromeos/contacts/contact_manager_stub.h
diff --git a/chrome/browser/chromeos/contacts/contact_manager_stub.h b/chrome/browser/chromeos/contacts/contact_manager_stub.h
deleted file mode 100644
index 340374073b20be56799c63013f88e5f22bb14bd9..0000000000000000000000000000000000000000
--- a/chrome/browser/chromeos/contacts/contact_manager_stub.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// 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_MANAGER_STUB_H_
-#define CHROME_BROWSER_CHROMEOS_CONTACTS_CONTACT_MANAGER_STUB_H_
-
-#include "chrome/browser/chromeos/contacts/contact_manager.h"
-
-#include "base/memory/scoped_vector.h"
-
-namespace contacts {
-
-// ContactManagerInterface implementation that returns a fixed set of contacts.
-// Used for testing.
-class ContactManagerStub : public ContactManagerInterface {
- public:
- explicit ContactManagerStub(Profile* profile);
- virtual ~ContactManagerStub();
-
- // Updates |contacts_|.
- void SetContacts(const ContactPointers& contacts);
-
- // Invokes OnContactsUpdated() on |observers_|.
- void NotifyObserversAboutUpdatedContacts();
-
- // ContactManagerInterface overrides:
- virtual base::WeakPtr<ContactManagerInterface> GetWeakPtr() OVERRIDE;
- virtual void AddObserver(ContactManagerObserver* observer, Profile* profile)
- OVERRIDE;
- virtual void RemoveObserver(ContactManagerObserver* observer,
- Profile* profile) OVERRIDE;
- virtual scoped_ptr<ContactPointers> GetAllContacts(Profile* profile) OVERRIDE;
- virtual const Contact* GetContactById(Profile* profile,
- const std::string& contact_id) OVERRIDE;
-
- private:
- // Profile expected to be passed to ContactManagerInterface methods.
- // Passing any other profile will result in a crash.
- Profile* profile_; // not owned
-
- // Observers registered for |profile_|.
- ObserverList<ContactManagerObserver> observers_;
-
- // Contacts that will be returned by GetAllContacts() and GetContactById().
- ScopedVector<Contact> contacts_;
-
- // Note: This should remain the last member so it'll be destroyed and
- // invalidate its weak pointers before any other members are destroyed.
- base::WeakPtrFactory<ContactManagerInterface> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(ContactManagerStub);
-};
-
-} // namespace contacts
-
-#endif // CHROME_BROWSER_CHROMEOS_CONTACTS_CONTACT_MANAGER_STUB_H_
« no previous file with comments | « chrome/browser/chromeos/contacts/contact_manager_observer.h ('k') | chrome/browser/chromeos/contacts/contact_manager_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698