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

Issue 10834203: Integrate invalidation API into ChromeToMobileService. (Closed)

Created:
8 years, 4 months ago by msw
Modified:
8 years, 4 months ago
CC:
chromium-reviews, tim (not reviewing), dcheng
Visibility:
Public.

Description

Integrate invalidation API into ChromeToMobileService. Update chrome/browser/DEPS with new dependencies: (google/cacheinvalidation and sync/notifier) Observe Sync Notifier invalidation notifications: (depend on this service for mobile list updates) (refresh the device list on cloud print invalidation) Remove RequestMobileListUpdate, timestamp, & account info: (no longer needed with invalidation integration) (just set command state and icon visibility w/HasMobiles) Lazily init the access token, queue search/send operations: (only get an access token as needed, add |task_queue_|) Allow concurrent cloud print device search requests: (handle user-triggered updates while fetching the list) Misc cleanup (CloudPrintUrl handling, tests, etc.) TODO(followup): Additional logging, tests, invalidation ack. BUG=102709, 137086 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=152609

Patch Set 1 #

Patch Set 2 : Sync and merge; consume ipc::invalidation::ObjectSource::CHROME_COMPONENTS. #

Total comments: 12

Patch Set 3 : Address comments; remove timestamp/version pref, etc. #

Patch Set 4 : Remove Cloud Print cookie check; revise access token and search request flow. #

Patch Set 5 : Add UpdateCommandState utility function and calls on notifications enabled/disabled. #

Patch Set 6 : Sync and rebase; merge invalidation API changes. #

Total comments: 10

Patch Set 7 : Address comments, remove RequestMobileListUpdate, use displayName and test server, etc. #

Patch Set 8 : Add |task_queue_| for lazily obtaining access tokens, etc. #

Patch Set 9 : Rebase, add RegisterForDeviceListInvalidations util function. #

Total comments: 2

Patch Set 10 : Tie to ProfileSyncService state, move invalidation registration back into ctor, update tests, etc. #

Total comments: 10

Patch Set 11 : Address comments. #

Total comments: 12

Patch Set 12 : Nix ProfileSyncServiceObserver impl; allow concurrent searches; cleanup, etc. #

Total comments: 2

Patch Set 13 : Update comment; sync and rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+186 lines, -182 lines) Patch
M chrome/browser/DEPS View 1 2 3 4 5 6 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/chrome_to_mobile_service.h View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +29 lines, -20 lines 0 comments Download
M chrome/browser/chrome_to_mobile_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 chunks +119 lines, -120 lines 0 comments Download
M chrome/browser/chrome_to_mobile_service_factory.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chrome_to_mobile_service_factory.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chrome_to_mobile_service_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +13 lines, -6 lines 0 comments Download
M chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller.mm View 1 2 3 4 5 6 7 2 chunks +1 line, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller_unittest.mm View 1 2 3 4 5 6 7 8 9 7 chunks +9 lines, -7 lines 0 comments Download
M chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/gtk/chrome_to_mobile_bubble_gtk.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -6 lines 0 comments Download
M chrome/browser/ui/gtk/location_bar_view_gtk.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/chrome_to_mobile_bubble_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +1 line, -4 lines 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -5 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -1 line 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
msw
Heads up on work in progress :)
8 years, 4 months ago (2012-08-08 19:54:49 UTC) #1
akalin
few comments + questions http://codereview.chromium.org/10834203/diff/2001/chrome/browser/chrome_to_mobile_service.cc File chrome/browser/chrome_to_mobile_service.cc (right): http://codereview.chromium.org/10834203/diff/2001/chrome/browser/chrome_to_mobile_service.cc#newcode69 chrome/browser/chrome_to_mobile_service.cc:69: const char kMobileListObjectId[] = "UCMMLST"; ...
8 years, 4 months ago (2012-08-08 23:06:27 UTC) #2
dcheng
http://codereview.chromium.org/10834203/diff/2001/chrome/browser/chrome_to_mobile_service.cc File chrome/browser/chrome_to_mobile_service.cc (right): http://codereview.chromium.org/10834203/diff/2001/chrome/browser/chrome_to_mobile_service.cc#newcode205 chrome/browser/chrome_to_mobile_service.cc:205: if (profile_) { Why do you need to check ...
8 years, 4 months ago (2012-08-08 23:11:10 UTC) #3
msw
Comments addressed and I made some additional progress, but I still have outstanding TODOs, including ...
8 years, 4 months ago (2012-08-10 22:05:05 UTC) #4
akalin
http://codereview.chromium.org/10834203/diff/2001/chrome/browser/chrome_to_mobile_service.cc File chrome/browser/chrome_to_mobile_service.cc (right): http://codereview.chromium.org/10834203/diff/2001/chrome/browser/chrome_to_mobile_service.cc#newcode69 chrome/browser/chrome_to_mobile_service.cc:69: const char kMobileListObjectId[] = "UCMMLST"; On 2012/08/10 22:05:05, msw ...
8 years, 4 months ago (2012-08-10 23:03:22 UTC) #5
nyquist
http://codereview.chromium.org/10834203/diff/2001/chrome/browser/chrome_to_mobile_service.cc File chrome/browser/chrome_to_mobile_service.cc (right): http://codereview.chromium.org/10834203/diff/2001/chrome/browser/chrome_to_mobile_service.cc#newcode69 chrome/browser/chrome_to_mobile_service.cc:69: const char kMobileListObjectId[] = "UCMMLST"; On 2012/08/10 23:03:22, akalin ...
8 years, 4 months ago (2012-08-10 23:46:39 UTC) #6
akalin
few more comments http://codereview.chromium.org/10834203/diff/2003/chrome/browser/chrome_to_mobile_service.cc File chrome/browser/chrome_to_mobile_service.cc (right): http://codereview.chromium.org/10834203/diff/2003/chrome/browser/chrome_to_mobile_service.cc#newcode196 chrome/browser/chrome_to_mobile_service.cc:196: profile_sync_service->UpdateRegisteredInvalidationIds(this, ids); what's the code path ...
8 years, 4 months ago (2012-08-13 22:23:58 UTC) #7
msw
Comments addressed and more. Still a work in progress, but feel free to take a ...
8 years, 4 months ago (2012-08-16 02:41:51 UTC) #8
akalin
On 2012/08/16 02:41:51, msw wrote: > Comments addressed and more. Still a work in progress, ...
8 years, 4 months ago (2012-08-17 22:09:26 UTC) #9
akalin
one more http://codereview.chromium.org/10834203/diff/5012/chrome/browser/chrome_to_mobile_service.cc File chrome/browser/chrome_to_mobile_service.cc (right): http://codereview.chromium.org/10834203/diff/5012/chrome/browser/chrome_to_mobile_service.cc#newcode467 chrome/browser/chrome_to_mobile_service.cc:467: profile_sync_service->RegisterInvalidationHandler(this); seems iffy to have this here ...
8 years, 4 months ago (2012-08-17 22:09:32 UTC) #10
msw
Done. Please take a look; this is ready for full review. I may add more ...
8 years, 4 months ago (2012-08-18 00:09:56 UTC) #11
akalin
sorry for the late reply. few more nits. http://codereview.chromium.org/10834203/diff/12002/chrome/browser/chrome_to_mobile_service.cc File chrome/browser/chrome_to_mobile_service.cc (right): http://codereview.chromium.org/10834203/diff/12002/chrome/browser/chrome_to_mobile_service.cc#newcode195 chrome/browser/chrome_to_mobile_service.cc:195: ProfileSyncServiceFactory::GetForProfile(profile_); ...
8 years, 4 months ago (2012-08-20 20:50:17 UTC) #12
msw
Comments addressed; please take another look, thanks! https://chromiumcodereview.appspot.com/10834203/diff/12002/chrome/browser/chrome_to_mobile_service.cc File chrome/browser/chrome_to_mobile_service.cc (right): https://chromiumcodereview.appspot.com/10834203/diff/12002/chrome/browser/chrome_to_mobile_service.cc#newcode195 chrome/browser/chrome_to_mobile_service.cc:195: ProfileSyncServiceFactory::GetForProfile(profile_); On ...
8 years, 4 months ago (2012-08-20 21:56:15 UTC) #13
akalin
sync stuff lgtm! http://codereview.chromium.org/10834203/diff/1007/chrome/browser/chrome_to_mobile_service.cc File chrome/browser/chrome_to_mobile_service.cc (right): http://codereview.chromium.org/10834203/diff/1007/chrome/browser/chrome_to_mobile_service.cc#newcode372 chrome/browser/chrome_to_mobile_service.cc:372: ProfileSyncServiceFactory::GetForProfile(profile_)->ShouldPushChanges(); maybe dcheck return value of ...
8 years, 4 months ago (2012-08-20 22:29:30 UTC) #14
msw
+sky for c/b/*service*, DEPS, and ui/views. +sail for c/b/ui/cocoa. +erg for c/b/ui/gtk. Please take a ...
8 years, 4 months ago (2012-08-20 22:43:57 UTC) #15
Elliot Glaysher
gtk lgtm
8 years, 4 months ago (2012-08-20 22:46:52 UTC) #16
sail
cocoa/* LGTM
8 years, 4 months ago (2012-08-20 22:48:36 UTC) #17
sky
LGTM https://chromiumcodereview.appspot.com/10834203/diff/1007/chrome/browser/chrome_to_mobile_service.h File chrome/browser/chrome_to_mobile_service.h (right): https://chromiumcodereview.appspot.com/10834203/diff/1007/chrome/browser/chrome_to_mobile_service.h#newcode10 chrome/browser/chrome_to_mobile_service.h:10: #include <queue> nit: sort
8 years, 4 months ago (2012-08-20 23:14:03 UTC) #18
nyquist
https://chromiumcodereview.appspot.com/10834203/diff/1007/chrome/browser/chrome_to_mobile_service.cc File chrome/browser/chrome_to_mobile_service.cc (right): https://chromiumcodereview.appspot.com/10834203/diff/1007/chrome/browser/chrome_to_mobile_service.cc#newcode531 chrome/browser/chrome_to_mobile_service.cc:531: if (search_request_.get()) If a user does cleanup in her ...
8 years, 4 months ago (2012-08-20 23:19:19 UTC) #19
nyquist
https://chromiumcodereview.appspot.com/10834203/diff/1007/chrome/browser/chrome_to_mobile_service.cc File chrome/browser/chrome_to_mobile_service.cc (left): https://chromiumcodereview.appspot.com/10834203/diff/1007/chrome/browser/chrome_to_mobile_service.cc#oldcode183 chrome/browser/chrome_to_mobile_service.cc:183: prefs->RegisterInt64Pref(prefs::kChromeToMobileTimestamp, 0, Remove from chrome/common/pref_names.[h|cc]
8 years, 4 months ago (2012-08-21 00:00:01 UTC) #20
tim (not reviewing)
https://chromiumcodereview.appspot.com/10834203/diff/1007/chrome/browser/chrome_to_mobile_service.cc File chrome/browser/chrome_to_mobile_service.cc (right): https://chromiumcodereview.appspot.com/10834203/diff/1007/chrome/browser/chrome_to_mobile_service.cc#newcode372 chrome/browser/chrome_to_mobile_service.cc:372: ProfileSyncServiceFactory::GetForProfile(profile_)->ShouldPushChanges(); Out of curiosity, what exactly do you need ...
8 years, 4 months ago (2012-08-21 00:33:47 UTC) #21
nyquist
https://chromiumcodereview.appspot.com/10834203/diff/1007/chrome/browser/chrome_to_mobile_service.cc File chrome/browser/chrome_to_mobile_service.cc (right): https://chromiumcodereview.appspot.com/10834203/diff/1007/chrome/browser/chrome_to_mobile_service.cc#newcode372 chrome/browser/chrome_to_mobile_service.cc:372: ProfileSyncServiceFactory::GetForProfile(profile_)->ShouldPushChanges(); On 2012/08/21 00:33:47, timsteele wrote: > Out of ...
8 years, 4 months ago (2012-08-21 00:38:58 UTC) #22
akalin
http://codereview.chromium.org/10834203/diff/1007/chrome/browser/chrome_to_mobile_service.cc File chrome/browser/chrome_to_mobile_service.cc (right): http://codereview.chromium.org/10834203/diff/1007/chrome/browser/chrome_to_mobile_service.cc#newcode372 chrome/browser/chrome_to_mobile_service.cc:372: ProfileSyncServiceFactory::GetForProfile(profile_)->ShouldPushChanges(); On 2012/08/21 00:38:59, nyquist wrote: > On 2012/08/21 ...
8 years, 4 months ago (2012-08-21 01:50:58 UTC) #23
msw
Comments addressed; Fred, Tim, Tommy, please take another look. https://chromiumcodereview.appspot.com/10834203/diff/1007/chrome/browser/chrome_to_mobile_service.cc File chrome/browser/chrome_to_mobile_service.cc (left): https://chromiumcodereview.appspot.com/10834203/diff/1007/chrome/browser/chrome_to_mobile_service.cc#oldcode183 chrome/browser/chrome_to_mobile_service.cc:183: ...
8 years, 4 months ago (2012-08-21 03:37:01 UTC) #24
akalin
sync lgtm https://chromiumcodereview.appspot.com/10834203/diff/5032/chrome/browser/chrome_to_mobile_service.cc File chrome/browser/chrome_to_mobile_service.cc (right): https://chromiumcodereview.appspot.com/10834203/diff/5032/chrome/browser/chrome_to_mobile_service.cc#newcode210 chrome/browser/chrome_to_mobile_service.cc:210: // Unregister for profile sync and cloud ...
8 years, 4 months ago (2012-08-21 07:47:50 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/10834203/2039
8 years, 4 months ago (2012-08-21 17:14:21 UTC) #26
commit-bot: I haz the power
Change committed as 152609
8 years, 4 months ago (2012-08-21 19:37:05 UTC) #27
msw
(just FYI, I did update the comment) https://chromiumcodereview.appspot.com/10834203/diff/5032/chrome/browser/chrome_to_mobile_service.cc File chrome/browser/chrome_to_mobile_service.cc (right): https://chromiumcodereview.appspot.com/10834203/diff/5032/chrome/browser/chrome_to_mobile_service.cc#newcode210 chrome/browser/chrome_to_mobile_service.cc:210: // Unregister ...
8 years, 4 months ago (2012-08-21 19:46:09 UTC) #28
msw
8 years, 4 months ago (2012-08-21 23:50:20 UTC) #29
FYI: r152609 reverted r152609 for debug test crashes, see continuation:
http://codereview.chromium.org/10869002

Powered by Google App Engine
This is Rietveld 408576698