PolicyManager: Move Init() from the Provider class to the classes that require it.
Not all the providers require an Init() method, and not all of them
can fail. For example, none of the Fake version of the providers
require an special initialization on a separated method.
This patch moves those Init() methods from the base Provider class
to the classes that require it. When you create a class Foo instance,
it is your responsibility to call Foo::Init(), and since you know the
type of the instance you are creating, you know what to expect from
its Init() method. This patch simplifies the FakeState class while
removing the Init() methods from those classes.
Init() methods are simply a way to have a constructor that can fail
without using exceptions and it is the style's guide recommended way
to have the same functionality.
BUG=chromium:358269
TEST=Build and unit test still passing.
Change-Id: Ida7d2cc1a494998144ca5c488513c85223def626
Reviewed-on: https://chromium-review.googlesource.com/196971
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
26 files changed