| Index: chrome/browser/chromeos/mock_cros_settings.cc
|
| diff --git a/chrome/browser/chromeos/mock_cros_settings.cc b/chrome/browser/chromeos/mock_cros_settings.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5cec06688374db57f45dc6dead78db7371ee2928
|
| --- /dev/null
|
| +++ b/chrome/browser/chromeos/mock_cros_settings.cc
|
| @@ -0,0 +1,36 @@
|
| +// Copyright (c) 2010 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chrome/browser/chromeos/mock_cros_settings.h"
|
| +
|
| +namespace chromeos {
|
| +
|
| +MockCrosSettings::MockCrosSettings()
|
| + : dict_(new DictionaryValue) {
|
| + // Some mock settings
|
| + SetBoolean(kAccountsPrefAllowBWSI, true);
|
| + SetBoolean(kAccountsPrefAllowGuest, true);
|
| +
|
| + ListValue* user_list = new ListValue;
|
| +
|
| + DictionaryValue* mock_user = new DictionaryValue;
|
| + mock_user->SetString(L"email", L"mock_user_1@gmail.com");
|
| + user_list->Append(mock_user);
|
| +
|
| + mock_user = new DictionaryValue;
|
| + mock_user->SetString(L"email", L"mock_user_2@gmail.com");
|
| + user_list->Append(mock_user);
|
| +
|
| + Set(kAccountsPrefUsers, user_list);
|
| +}
|
| +
|
| +void MockCrosSettings::Set(const std::wstring& path, Value* in_value) {
|
| + dict_->Set(path, in_value);
|
| +}
|
| +
|
| +bool MockCrosSettings::Get(const std::wstring& path, Value** out_value) const {
|
| + return dict_->Get(path, out_value);
|
| +}
|
| +
|
| +} // namespace chromeos
|
|
|