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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« 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