| Index: chrome/browser/chromeos/contacts/contact_map.cc
|
| diff --git a/chrome/browser/chromeos/contacts/contact_map.cc b/chrome/browser/chromeos/contacts/contact_map.cc
|
| index b24fbc0aeec05525fd41877e36bc05da128d32c1..f02aef4244ce009523a0be32b1e1ae544a0986a0 100644
|
| --- a/chrome/browser/chromeos/contacts/contact_map.cc
|
| +++ b/chrome/browser/chromeos/contacts/contact_map.cc
|
| @@ -17,6 +17,15 @@ const Contact* ContactMap::Find(const std::string& contact_id) const {
|
| return (it != contacts_.end()) ? it->second : NULL;
|
| }
|
|
|
| +void ContactMap::Erase(const std::string& contact_id) {
|
| + Map::iterator it = contacts_.find(contact_id);
|
| + if (it == contacts_.end())
|
| + return;
|
| +
|
| + delete it->second;
|
| + contacts_.erase(it);
|
| +}
|
| +
|
| void ContactMap::Clear() {
|
| STLDeleteValues(&contacts_);
|
| }
|
| @@ -50,18 +59,4 @@ void ContactMap::Merge(scoped_ptr<ScopedVector<Contact> > updated_contacts,
|
| updated_contacts->weak_clear();
|
| }
|
|
|
| -base::Time ContactMap::GetMaxUpdateTime() const {
|
| - base::Time max_update_time;
|
| - for (const_iterator it = begin(); it != end(); ++it) {
|
| - const Contact* contact = it->second;
|
| - const base::Time update_time =
|
| - base::Time::FromInternalValue(contact->update_time());
|
| - if (!update_time.is_null() &&
|
| - (max_update_time.is_null() || max_update_time < update_time)) {
|
| - max_update_time = update_time;
|
| - }
|
| - }
|
| - return max_update_time;
|
| -}
|
| -
|
| } // namespace contacts
|
|
|