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

Side by Side Diff: samples/third_party/todomvc_performance/web/lib-elements/polymer_localstorage.dart

Issue 204733004: Added TodoMVC startup benchmarks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Polymer Authors. All rights reserved. 1 // Copyright 2013 The Polymer Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 library todomvc.web.lib_elements.polymer_localstorage; 4 library todomvc.web.lib_elements.polymer_localstorage;
5 5
6 import 'dart:convert' show JSON; 6 import 'dart:convert' show JSON;
7 import 'dart:html'; 7 import 'dart:html';
8 import 'package:polymer/polymer.dart'; 8 import 'package:polymer/polymer.dart';
9 9
10 // TODO(jmesserly): replace with interop to <polymer-localstorage>. 10 // TODO(jmesserly): replace with interop to <polymer-localstorage>.
(...skipping 20 matching lines...) Expand all
31 value = JSON.decode(s); 31 value = JSON.decode(s);
32 } else { 32 } else {
33 value = s; 33 value = s;
34 } 34 }
35 } 35 }
36 36
37 void save() { 37 void save() {
38 window.localStorage[name] = useRaw ? value : JSON.encode(value); 38 window.localStorage[name] = useRaw ? value : JSON.encode(value);
39 } 39 }
40 } 40 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698