summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/gdata/gdata_contacts_service_stub.cc
diff options
context:
space:
mode:
authorderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-09 00:08:34 +0000
committerderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-09 00:08:34 +0000
commitf212ac256193b412eb3709c5c6ff45660dc56c34 (patch)
tree0126bf7df257456aba34f9bfe1e0b9b240ae13a5 /chrome/browser/chromeos/gdata/gdata_contacts_service_stub.cc
parent0ca83807909cb9ab68786a102ce5700903a84883 (diff)
downloadchromium_src-f212ac256193b412eb3709c5c6ff45660dc56c34.zip
chromium_src-f212ac256193b412eb3709c5c6ff45660dc56c34.tar.gz
chromium_src-f212ac256193b412eb3709c5c6ff45660dc56c34.tar.bz2
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
Diffstat (limited to 'chrome/browser/chromeos/gdata/gdata_contacts_service_stub.cc')
-rw-r--r--chrome/browser/chromeos/gdata/gdata_contacts_service_stub.cc4
1 files changed, 3 insertions, 1 deletions
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();