New issue
Advanced search Search tips

Issue 906081 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 21
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocking:
issue 889899
issue 906084



Sign in to add a comment

Extract SigninManager::IsUsernameAllowedByPolicy to a free function

Project Member Reported by sdefresne@chromium.org, Nov 16

Issue description

To allow removing dependency on SigninManager::IsUsernameAllowedByPolicy, the method needs to be extracted to a free function. 
 
This free function should probably have the following prototype:

  namespace identity {
  bool IsUsernameAllowedByPattern(
      base::StringPiece username,
      base::StringPiece pattern);
  }

Labels: -Pri-3 Pri-1
Blocking: 906084
Owner: ma...@igalia.com
Status: Started (was: Available)
Project Member

Comment 6 by bugdroid1@chromium.org, Nov 21

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

commit fa2d589a44a2ba457694af71e3120b7133a68f73
Author: Mario Sanchez Prada <mario@igalia.com>
Date: Wed Nov 21 11:22:14 2018

Extract SigninManager::IsUsernameAllowedByPolicy to a free function

This is the first step of those that will allow us remove the dependency
from SigninManager::IsAllowedUsername() in the long run, as part of our
effort to migrate parts of the code base to the Identity service.

Note that this free function will be in the |identity| namespace even
if it's actually declared & defined in signin_manager.[h|cc] for now,
which should be ok since this is just a temporary situation until we
get to a state where SigninManager is not used by any consumers outside
//services/identity, at which point we'd simply move it to the public
C++ API in there. We can't do it now, though, because doing so would
create a dependency cycle as //components/signin would have to depend
on //services/identity (which in turn depends on //components/signin).

Bug:  906081 
Change-Id: I0ec5817661c0cfd27c7a08ef67eae389beff1230
Reviewed-on: https://chromium-review.googlesource.com/c/1344145
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Mario Sanchez Prada <mario@igalia.com>
Cr-Commit-Position: refs/heads/master@{#609998}
[modify] https://crrev.com/fa2d589a44a2ba457694af71e3120b7133a68f73/components/signin/core/browser/signin_manager.cc
[modify] https://crrev.com/fa2d589a44a2ba457694af71e3120b7133a68f73/components/signin/core/browser/signin_manager.h

Status: Fixed (was: Started)

Sign in to add a comment