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

Unified Diff: runtime/observatory/lib/src/app/settings.dart

Issue 839543002: Revert "Build Observatory with runtime" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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 | « runtime/observatory/lib/src/app/page.dart ('k') | runtime/observatory/lib/src/app/target_manager.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/src/app/settings.dart
diff --git a/runtime/observatory/lib/src/app/settings.dart b/runtime/observatory/lib/src/app/settings.dart
deleted file mode 100644
index 2a7bbb37dd983043cb4f3fb3123a6fa07afec899..0000000000000000000000000000000000000000
--- a/runtime/observatory/lib/src/app/settings.dart
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of app;
-
-/// Static settings database.
-class _Settings {
- static Storage _storage = window.localStorage;
-
- /// Associated [value] with [key]. [value] must be JSON encodable.
- static void set(String key, dynamic value) {
- _storage[key] = JSON.encode(value);
- }
-
- /// Get value associated with [key]. Return value will be a JSON encodable
- /// object.
- static dynamic get(String key) {
- var value = _storage[key];
- if (value == null) {
- return null;
- }
- return JSON.decode(value);
- }
-}
-
-/// A group of settings each prefixed with group name and a dot.
-class SettingsGroup {
- /// Group name
- final String group;
-
- SettingsGroup(this.group);
-
- String _fullKey(String key) => '$group.$key';
-
- void set(String key, dynamic value) {
- var fullKey = _fullKey(key);
- _Settings.set(fullKey, value);
- }
-
- dynamic get(String key) {
- var fullKey = _fullKey(key);
- return _Settings.get(fullKey);
- }
-}
« no previous file with comments | « runtime/observatory/lib/src/app/page.dart ('k') | runtime/observatory/lib/src/app/target_manager.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698