Register all profiles if the auto_registration flag is enabled.

+ small refactoring.

Change-Id: I3fcbb18db0c8097141f0cce8e0b17096bb10565b
1 file changed