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

Issue 9863054: Limit Chrome To Mobile cloud print access; refinements etc. (Closed)

Created:
8 years, 9 months ago by msw
Modified:
8 years, 8 months ago
CC:
chromium-reviews, nyquist
Visibility:
Public.

Description

Limit Chrome To Mobile cloud print access; refinements etc. Check the user's account info before contacting cloud print. Only ping cloud print for users of that service. Make ChromeToMobileService a RefcountedProfileKeyedService. Add and check |temp_dir_valid_| on GenerateSnapshot. Fix a JSON DictionaryValue leak from ParseResponseJSON use. Make |mobiles_| a ScopedVector of DeepCopy DictionaryValues. Call new ChromeToMobileService::HasDevices for encapsulation. Call RequestMobileListUpdate from bubbles, not their callers. Mock RequestMobileListUpdate so tests do not send requests. Store the service, not the profile, as a bubble class member. Skip IsSyncAccessible on updates (the first check suffices). Auto-close on Mac via performSelector, not PostDelayedTask. cancelPreviousPerformRequestsWithTarget on windowWillClose. Call OnChanged after UpdateChromeToMobileEnabled for Mac. (the icon wasn't showing up immediately on Release builds) BUG=102709, 118691 TEST=Less cloud print traffic. No apparent behavior changes. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=129779

Patch Set 1 : Fix HasDevices checks; performSelector instead of PostDelayedTask. #

Patch Set 2 : Only check cloud print access with a valid gaia access token. #

Patch Set 3 : Mock out RequestMobileListUpdate so tests do not send requests. #

Total comments: 10

Patch Set 4 : Address comments, make ChromeToMobileService RefCountedThreadSafe, etc. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+180 lines, -98 lines) Patch
M chrome/browser/chrome_to_mobile_service.h View 1 2 3 7 chunks +23 lines, -7 lines 0 comments Download
M chrome/browser/chrome_to_mobile_service.cc View 1 2 3 14 chunks +99 lines, -29 lines 3 comments Download
M chrome/browser/chrome_to_mobile_service_factory.h View 1 2 3 1 chunk +6 lines, -5 lines 0 comments Download
M chrome/browser/chrome_to_mobile_service_factory.cc View 1 2 3 2 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller.h View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller.mm View 1 2 3 6 chunks +7 lines, -10 lines 0 comments Download
M chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller_unittest.mm View 1 2 6 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/gtk/chrome_to_mobile_bubble_gtk.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/gtk/chrome_to_mobile_bubble_gtk.cc View 3 chunks +9 lines, -10 lines 0 comments Download
M chrome/browser/ui/gtk/location_bar_view_gtk.cc View 2 chunks +3 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/chrome_to_mobile_bubble_view.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/views/chrome_to_mobile_bubble_view.cc View 3 chunks +8 lines, -8 lines 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.cc View 3 chunks +5 lines, -10 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
msw
Please take a look; thanks! Sky: All except chrome/browser/ui/cocoa (unless you care to). Shess: chrome/browser/ui/cocoa
8 years, 9 months ago (2012-03-28 02:32:17 UTC) #1
nyquist
https://chromiumcodereview.appspot.com/9863054/diff/7005/chrome/browser/chrome_to_mobile_service.cc File chrome/browser/chrome_to_mobile_service.cc (right): https://chromiumcodereview.appspot.com/9863054/diff/7005/chrome/browser/chrome_to_mobile_service.cc#newcode50 chrome/browser/chrome_to_mobile_service.cc:50: const int kSearchRequestDelayHours = 24; With this new limitation, ...
8 years, 9 months ago (2012-03-28 06:26:07 UTC) #2
sky
https://chromiumcodereview.appspot.com/9863054/diff/7005/chrome/browser/chrome_to_mobile_service.cc File chrome/browser/chrome_to_mobile_service.cc (right): https://chromiumcodereview.appspot.com/9863054/diff/7005/chrome/browser/chrome_to_mobile_service.cc#newcode372 chrome/browser/chrome_to_mobile_service.cc:372: DictionaryValue* json_data = NULL; Do you need to delete ...
8 years, 8 months ago (2012-03-28 15:49:34 UTC) #3
Scott Hess - ex-Googler
https://chromiumcodereview.appspot.com/9863054/diff/7005/chrome/browser/chrome_to_mobile_service.cc File chrome/browser/chrome_to_mobile_service.cc (right): https://chromiumcodereview.appspot.com/9863054/diff/7005/chrome/browser/chrome_to_mobile_service.cc#newcode190 chrome/browser/chrome_to_mobile_service.cc:190: base::Unretained(this))); I find myself wondering how you know that ...
8 years, 8 months ago (2012-03-28 15:58:57 UTC) #4
msw
Addressed comments, PTAL; thanks! https://chromiumcodereview.appspot.com/9863054/diff/7005/chrome/browser/chrome_to_mobile_service.cc File chrome/browser/chrome_to_mobile_service.cc (right): https://chromiumcodereview.appspot.com/9863054/diff/7005/chrome/browser/chrome_to_mobile_service.cc#newcode50 chrome/browser/chrome_to_mobile_service.cc:50: const int kSearchRequestDelayHours = 24; ...
8 years, 8 months ago (2012-03-29 01:18:15 UTC) #5
sky
LGTM
8 years, 8 months ago (2012-03-29 15:57:07 UTC) #6
Scott Hess - ex-Googler
LGTM, except I'm still not enthused about accessing the data from two threads. But since ...
8 years, 8 months ago (2012-03-29 22:26:17 UTC) #7
msw
Filed crbug.com/121003; will land soon and may request merge. https://chromiumcodereview.appspot.com/9863054/diff/17001/chrome/browser/chrome_to_mobile_service.cc File chrome/browser/chrome_to_mobile_service.cc (right): https://chromiumcodereview.appspot.com/9863054/diff/17001/chrome/browser/chrome_to_mobile_service.cc#newcode309 chrome/browser/chrome_to_mobile_service.cc:309: ...
8 years, 8 months ago (2012-03-29 23:21:48 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/9863054/17001
8 years, 8 months ago (2012-03-29 23:22:10 UTC) #9
Scott Hess - ex-Googler
https://chromiumcodereview.appspot.com/9863054/diff/17001/chrome/browser/chrome_to_mobile_service.cc File chrome/browser/chrome_to_mobile_service.cc (right): https://chromiumcodereview.appspot.com/9863054/diff/17001/chrome/browser/chrome_to_mobile_service.cc#newcode309 chrome/browser/chrome_to_mobile_service.cc:309: } On 2012/03/29 23:21:48, msw wrote: > > threads ...
8 years, 8 months ago (2012-03-29 23:51:08 UTC) #10
commit-bot: I haz the power
Try job failure for 9863054-17001 (retry) on win_rel for step "browser_tests". It's a second try, ...
8 years, 8 months ago (2012-03-30 02:07:47 UTC) #11
msw
8 years, 8 months ago (2012-03-30 03:51:40 UTC) #12

Powered by Google App Engine
This is Rietveld 408576698