blob: 6fa663ba48ee6d0c777ee2cc74bec00a314efb17 [file] [log] [blame]
Alex Deymo2de23f52014-02-26 14:30:13 -08001// Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Alex Deymo2de23f52014-02-26 14:30:13 -08005#include "update_engine/policy_manager/fake_state.h"
Alex Deymo94c06162014-03-21 20:34:46 -07006
7#include "base/memory/scoped_ptr.h"
Alex Deymo2de23f52014-02-26 14:30:13 -08008
9namespace chromeos_policy_manager {
10
Alex Deymo94c06162014-03-21 20:34:46 -070011FakeState* FakeState::Construct() {
12 scoped_ptr<FakeState> fake_state(new FakeState());
David Zeuthen4e89e2c2014-04-24 11:47:00 -070013 if (!(fake_state->config_provider_.Init() &&
14 fake_state->device_policy_provider_.Init() &&
15 fake_state->random_provider_.Init() &&
16 fake_state->shill_provider_.Init() &&
17 fake_state->system_provider_.Init() &&
18 fake_state->time_provider_.Init() &&
19 fake_state->updater_provider_.Init())) {
Alex Deymo94c06162014-03-21 20:34:46 -070020 return NULL;
21 }
22 return fake_state.release();
Alex Deymo2de23f52014-02-26 14:30:13 -080023}
24
25} // namespace chromeos_policy_manager