| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2010 The Chromium 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 |
| 5 #include "chrome/browser/chromeos/mock_cros_settings.h" |
| 6 |
| 7 namespace chromeos { |
| 8 |
| 9 MockCrosSettings::MockCrosSettings() |
| 10 : dict_(new DictionaryValue) { |
| 11 // Some mock settings |
| 12 SetBoolean(kAccountsPrefAllowBWSI, true); |
| 13 SetBoolean(kAccountsPrefAllowGuest, true); |
| 14 |
| 15 ListValue* user_list = new ListValue; |
| 16 |
| 17 DictionaryValue* mock_user = new DictionaryValue; |
| 18 mock_user->SetString(L"email", L"mock_user_1@gmail.com"); |
| 19 user_list->Append(mock_user); |
| 20 |
| 21 mock_user = new DictionaryValue; |
| 22 mock_user->SetString(L"email", L"mock_user_2@gmail.com"); |
| 23 user_list->Append(mock_user); |
| 24 |
| 25 Set(kAccountsPrefUsers, user_list); |
| 26 } |
| 27 |
| 28 void MockCrosSettings::Set(const std::wstring& path, Value* in_value) { |
| 29 dict_->Set(path, in_value); |
| 30 } |
| 31 |
| 32 bool MockCrosSettings::Get(const std::wstring& path, Value** out_value) const { |
| 33 return dict_->Get(path, out_value); |
| 34 } |
| 35 |
| 36 } // namespace chromeos |
| OLD | NEW |