Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: chrome/browser/chromeos/mock_cros_settings.cc

Issue 2935011: Initial accounts options page. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: use ListItem directly for now per arv Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/mock_cros_settings.h ('k') | chrome/browser/dom_ui/core_options_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698