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

Unified Diff: chrome/browser/chromeos/contacts/google_contact_store.cc

Issue 10896031: contacts: Add ContactManagerInterface::GetWeakPtr(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « chrome/browser/chromeos/contacts/contact_manager_stub.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/contacts/google_contact_store.cc
diff --git a/chrome/browser/chromeos/contacts/google_contact_store.cc b/chrome/browser/chromeos/contacts/google_contact_store.cc
index 541c04908031426ea30ba4773db99f4935f5b6d2..83b30cfbbe810ce969ab7468dad1ea3d4c1da244 100644
--- a/chrome/browser/chromeos/contacts/google_contact_store.cc
+++ b/chrome/browser/chromeos/contacts/google_contact_store.cc
@@ -305,15 +305,18 @@ void GoogleContactStore::OnDownloadSuccess(
MergeContacts(is_full_update, updated_contacts.Pass());
last_successful_update_start_time_ = update_start_time;
- if (is_full_update || got_updates > 0) {
+ if (is_full_update || got_updates) {
FOR_EACH_OBSERVER(ContactStoreObserver,
observers_,
OnContactsUpdated(this));
}
if (db_) {
+ // Even if this was an incremental update and we didn't get any updated
+ // contacts, we still want to write updated metadata containing
+ // |update_start_time|.
VLOG(1) << "Saving " << contacts_to_save_to_db->size() << " contact(s) to "
- << "database as " << (is_full_update ? "full" : "partial")
+ << "database as " << (is_full_update ? "full" : "incremental")
<< " update";
scoped_ptr<UpdateMetadata> metadata(new UpdateMetadata);
metadata->set_last_update_start_time(update_start_time.ToInternalValue());
« no previous file with comments | « chrome/browser/chromeos/contacts/contact_manager_stub.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698