New issue
Advanced search Search tips

Issue 688387 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

OAuth2TokenService should take unique_ptr<OAuth2TokenServiceDelegate> instead of OAuth2TokenServiceDelegate*

Project Member Reported by jkrcal@chromium.org, Feb 3 2017

Issue description

Currently the service takes ownership of the raw pointer to the delegate.
It should take unique_ptr<> instead to clarify that it takes ownership.

The same applies to all the classes that extend OAuth2TokenService.
 

Comment 1 by ew...@chromium.org, Feb 8 2017

Cc: ew...@chromium.org jlebel@chromium.org bsazonov@chromium.org msarda@chromium.org
Status: Available (was: Untriaged)
cc'ing Chrome signin folks, marking as Available.
Owner: bsazonov@chromium.org
Status: Started (was: Available)
Project Member

Comment 3 by bugdroid1@chromium.org, Feb 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a9cae0d0eb1e430848ca10bdbfd22cc1f373610e

commit a9cae0d0eb1e430848ca10bdbfd22cc1f373610e
Author: bsazonov <bsazonov@chromium.org>
Date: Fri Feb 10 10:46:30 2017

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}

[modify] https://crrev.com/a9cae0d0eb1e430848ca10bdbfd22cc1f373610e/chrome/browser/chromeos/settings/device_oauth2_token_service.cc
[modify] https://crrev.com/a9cae0d0eb1e430848ca10bdbfd22cc1f373610e/chrome/browser/chromeos/settings/device_oauth2_token_service.h
[modify] https://crrev.com/a9cae0d0eb1e430848ca10bdbfd22cc1f373610e/chrome/browser/chromeos/settings/device_oauth2_token_service_factory.cc
[modify] https://crrev.com/a9cae0d0eb1e430848ca10bdbfd22cc1f373610e/chrome/browser/chromeos/settings/device_oauth2_token_service_unittest.cc
[modify] https://crrev.com/a9cae0d0eb1e430848ca10bdbfd22cc1f373610e/chrome/browser/signin/oauth2_token_service_delegate_android.h
[modify] https://crrev.com/a9cae0d0eb1e430848ca10bdbfd22cc1f373610e/chrome/browser/signin/profile_oauth2_token_service_factory.cc
[modify] https://crrev.com/a9cae0d0eb1e430848ca10bdbfd22cc1f373610e/components/ntp_snippets/remote/remote_suggestions_fetcher_unittest.cc
[modify] https://crrev.com/a9cae0d0eb1e430848ca10bdbfd22cc1f373610e/components/signin/core/browser/fake_profile_oauth2_token_service.cc
[modify] https://crrev.com/a9cae0d0eb1e430848ca10bdbfd22cc1f373610e/components/signin/core/browser/fake_profile_oauth2_token_service.h
[modify] https://crrev.com/a9cae0d0eb1e430848ca10bdbfd22cc1f373610e/components/signin/core/browser/profile_oauth2_token_service.cc
[modify] https://crrev.com/a9cae0d0eb1e430848ca10bdbfd22cc1f373610e/components/signin/core/browser/profile_oauth2_token_service.h
[modify] https://crrev.com/a9cae0d0eb1e430848ca10bdbfd22cc1f373610e/extensions/shell/browser/shell_oauth2_token_service.cc
[modify] https://crrev.com/a9cae0d0eb1e430848ca10bdbfd22cc1f373610e/google_apis/gaia/fake_oauth2_token_service.cc
[modify] https://crrev.com/a9cae0d0eb1e430848ca10bdbfd22cc1f373610e/google_apis/gaia/oauth2_token_service.cc
[modify] https://crrev.com/a9cae0d0eb1e430848ca10bdbfd22cc1f373610e/google_apis/gaia/oauth2_token_service.h
[modify] https://crrev.com/a9cae0d0eb1e430848ca10bdbfd22cc1f373610e/google_apis/gaia/oauth2_token_service_unittest.cc
[modify] https://crrev.com/a9cae0d0eb1e430848ca10bdbfd22cc1f373610e/ios/chrome/browser/signin/fake_oauth2_token_service_builder.mm
[modify] https://crrev.com/a9cae0d0eb1e430848ca10bdbfd22cc1f373610e/ios/chrome/browser/signin/oauth2_token_service_factory.mm

Status: Fixed (was: Started)

Sign in to add a comment