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

Issue 10823182: contacts: Rate-limit GData photo requests and handle 404s. (Closed)

Created:
8 years, 4 months ago by Daniel Erat
Modified:
8 years, 4 months ago
Reviewers:
satorux1
CC:
chromium-reviews, nkostylev+watch_chromium.org, derat+watch_chromium.org, achuith+watch_chromium.org, oshima+watch_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

contacts: Rate-limit GData photo requests and handle 404s. The API returns 503 errors if we try to download photos too quickly. This change adds cheesy rate-limiting so we don't request more than 10 photos per second (which appears to be the undocumented limit) and also makes us retry when we get a 503. I'm also making GDataContactsService report success even when we got 404 errors for some photos, as I see this happen with my personal account. :-/ BUG=128805 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=150344

Patch Set 1 #

Total comments: 5

Patch Set 2 : apply review feedback #

Patch Set 3 : merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+60 lines, -22 lines) Patch
M chrome/browser/chromeos/gdata/gdata_contacts_service.h View 1 2 chunks +14 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_contacts_service.cc View 1 2 10 chunks +38 lines, -14 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_contacts_service_browsertest.cc View 1 3 chunks +8 lines, -2 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Daniel Erat
https://chromiumcodereview.appspot.com/10823182/diff/1/chrome/browser/chromeos/gdata/gdata_contacts_service_browsertest.cc File chrome/browser/chromeos/gdata/gdata_contacts_service_browsertest.cc (right): https://chromiumcodereview.appspot.com/10823182/diff/1/chrome/browser/chromeos/gdata/gdata_contacts_service_browsertest.cc#newcode245 chrome/browser/chromeos/gdata/gdata_contacts_service_browsertest.cc:245: service()->set_max_photo_downloads_per_second_for_testing(6); This means that the test will take at ...
8 years, 4 months ago (2012-08-06 16:25:33 UTC) #1
satorux1
LGTM with suggestions. http://codereview.chromium.org/10823182/diff/1/chrome/browser/chromeos/gdata/gdata_contacts_service.cc File chrome/browser/chromeos/gdata/gdata_contacts_service.cc (right): http://codereview.chromium.org/10823182/diff/1/chrome/browser/chromeos/gdata/gdata_contacts_service.cc#newcode544 chrome/browser/chromeos/gdata/gdata_contacts_service.cc:544: << "for " << contact->provider_id() << ...
8 years, 4 months ago (2012-08-06 20:57:08 UTC) #2
Daniel Erat
http://codereview.chromium.org/10823182/diff/1/chrome/browser/chromeos/gdata/gdata_contacts_service.cc File chrome/browser/chromeos/gdata/gdata_contacts_service.cc (right): http://codereview.chromium.org/10823182/diff/1/chrome/browser/chromeos/gdata/gdata_contacts_service.cc#newcode544 chrome/browser/chromeos/gdata/gdata_contacts_service.cc:544: << "for " << contact->provider_id() << "; giving up"; ...
8 years, 4 months ago (2012-08-06 23:12:21 UTC) #3
satorux1
LGTM!
8 years, 4 months ago (2012-08-06 23:49:55 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/derat@chromium.org/10823182/5002
8 years, 4 months ago (2012-08-07 00:25:49 UTC) #5
commit-bot: I haz the power
Failed to apply patch for chrome/browser/chromeos/gdata/gdata_contacts_service.cc: While running patch -p1 --forward --force; patching file chrome/browser/chromeos/gdata/gdata_contacts_service.cc ...
8 years, 4 months ago (2012-08-07 02:20:21 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/derat@chromium.org/10823182/13001
8 years, 4 months ago (2012-08-07 13:13:14 UTC) #7
commit-bot: I haz the power
8 years, 4 months ago (2012-08-07 14:57:19 UTC) #8
Change committed as 150344

Powered by Google App Engine
This is Rietveld 408576698