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

Issue 2685123002: Make OAuth2TokenService and subclasses take delegate by unique_ptr (Closed)

Created:
3 years, 10 months ago by bsazonov
Modified:
3 years, 10 months ago
Reviewers:
jkrcal, Daniel Erat, msarda
CC:
chromium-reviews, extensions-reviews_chromium.org, pkl (ping after 24h if needed), noyau+watch_chromium.org, oshima+watch_chromium.org, marq+watch_chromium.org, chromium-apps-reviews_chromium.org, davemoore+watch_chromium.org, sdefresne+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make OAuth2TokenService and subclasses take delegate by unique_ptr OAuth2TokenService and it's subclasses already take ownership of the delegate passed to the constructor. Using unique_ptr instead of raw pointer makes this behavior obvious for callers and also reduces the chance of leaks. BUG=688387 Review-Url: https://codereview.chromium.org/2685123002 Cr-Commit-Position: refs/heads/master@{#449584} Committed: https://chromium.googlesource.com/chromium/src/+/a9cae0d0eb1e430848ca10bdbfd22cc1f373610e

Patch Set 1 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+93 lines, -74 lines) Patch
M chrome/browser/chromeos/settings/device_oauth2_token_service.h View 2 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/settings/device_oauth2_token_service.cc View 6 chunks +21 lines, -12 lines 0 comments Download
M chrome/browser/chromeos/settings/device_oauth2_token_service_factory.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/settings/device_oauth2_token_service_unittest.cc View 1 chunk +3 lines, -4 lines 2 comments Download
M chrome/browser/signin/oauth2_token_service_delegate_android.h View 2 chunks +4 lines, -5 lines 0 comments Download
M chrome/browser/signin/profile_oauth2_token_service_factory.cc View 1 chunk +8 lines, -9 lines 0 comments Download
M components/ntp_snippets/remote/remote_suggestions_fetcher_unittest.cc View 3 chunks +3 lines, -7 lines 0 comments Download
M components/signin/core/browser/fake_profile_oauth2_token_service.h View 1 chunk +2 lines, -1 line 0 comments Download
M components/signin/core/browser/fake_profile_oauth2_token_service.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M components/signin/core/browser/profile_oauth2_token_service.h View 1 chunk +2 lines, -1 line 0 comments Download
M components/signin/core/browser/profile_oauth2_token_service.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M extensions/shell/browser/shell_oauth2_token_service.cc View 2 chunks +5 lines, -3 lines 0 comments Download
M google_apis/gaia/fake_oauth2_token_service.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M google_apis/gaia/oauth2_token_service.h View 2 chunks +3 lines, -1 line 0 comments Download
M google_apis/gaia/oauth2_token_service.cc View 2 chunks +7 lines, -2 lines 0 comments Download
M google_apis/gaia/oauth2_token_service_unittest.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M ios/chrome/browser/signin/fake_oauth2_token_service_builder.mm View 1 chunk +3 lines, -3 lines 0 comments Download
M ios/chrome/browser/signin/oauth2_token_service_factory.mm View 1 chunk +8 lines, -9 lines 0 comments Download

Messages

Total messages: 54 (47 generated)
bsazonov
jkrcal@chromium.org: Please review changes in components/ntp_snippets/remote/remote_suggestions_fetcher_unittest.cc derat@chromium.org: Please review changes in chrome/browser/chromeos/settings/ and extensions/shell/browser/shell_oauth2_token_service.cc msarda@chromium.org: ...
3 years, 10 months ago (2017-02-09 19:49:38 UTC) #43
jkrcal
components/ntp_snippets/remote/remote_suggestions_fetcher_unittest.cc lgtm Thanks!
3 years, 10 months ago (2017-02-09 20:14:19 UTC) #46
Daniel Erat
lgtm for c/b/chromeos/settings and extensions/shell/browser/
3 years, 10 months ago (2017-02-09 22:15:03 UTC) #47
msarda
LGTM with an optional nit. Thank you for doing this clean-up. https://codereview.chromium.org/2685123002/diff/70018/chrome/browser/chromeos/settings/device_oauth2_token_service_unittest.cc File chrome/browser/chromeos/settings/device_oauth2_token_service_unittest.cc (right): ...
3 years, 10 months ago (2017-02-10 09:21:22 UTC) #48
bsazonov
https://codereview.chromium.org/2685123002/diff/70018/chrome/browser/chromeos/settings/device_oauth2_token_service_unittest.cc File chrome/browser/chromeos/settings/device_oauth2_token_service_unittest.cc (right): https://codereview.chromium.org/2685123002/diff/70018/chrome/browser/chromeos/settings/device_oauth2_token_service_unittest.cc#newcode137 chrome/browser/chromeos/settings/device_oauth2_token_service_unittest.cc:137: oauth2_service_.reset(new DeviceOAuth2TokenService(std::move(delegate))); On 2017/02/10 09:21:22, msarda wrote: > Optional: ...
3 years, 10 months ago (2017-02-10 10:41:50 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2685123002/70018
3 years, 10 months ago (2017-02-10 10:42:22 UTC) #51
commit-bot: I haz the power
3 years, 10 months ago (2017-02-10 10:47:10 UTC) #54
Message was sent while issue was closed.
Committed patchset #1 (id:70018) as
https://chromium.googlesource.com/chromium/src/+/a9cae0d0eb1e430848ca10bdbfd2...

Powered by Google App Engine
This is Rietveld 408576698