From f212ac256193b412eb3709c5c6ff45660dc56c34 Mon Sep 17 00:00:00 2001 From: "derat@chromium.org" Date: Thu, 9 Aug 2012 00:08:34 +0000 Subject: contacts: Defer updates when offline. This make GoogleContactStore postpone trying to update contacts via GData when the system doesn't have a network connection. BUG=128805 TEST=none Review URL: https://chromiumcodereview.appspot.com/10829247 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150643 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/chromeos/gdata/gdata_contacts_service_stub.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'chrome/browser/chromeos/gdata/gdata_contacts_service_stub.cc') diff --git a/chrome/browser/chromeos/gdata/gdata_contacts_service_stub.cc b/chrome/browser/chromeos/gdata/gdata_contacts_service_stub.cc index fc6b417..a090f19 100644 --- a/chrome/browser/chromeos/gdata/gdata_contacts_service_stub.cc +++ b/chrome/browser/chromeos/gdata/gdata_contacts_service_stub.cc @@ -14,7 +14,8 @@ using content::BrowserThread; namespace gdata { GDataContactsServiceStub::GDataContactsServiceStub() - : download_should_succeed_(true) { + : num_download_requests_(0), + download_should_succeed_(true) { } GDataContactsServiceStub::~GDataContactsServiceStub() { @@ -35,6 +36,7 @@ void GDataContactsServiceStub::DownloadContacts( FailureCallback failure_callback, const base::Time& min_update_time) { CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + num_download_requests_++; if (!download_should_succeed_) { failure_callback.Run(); -- cgit v1.1