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

Unified Diff: samples/swarm/DataSource.dart

Issue 10919146: Get rid of a lot of () for getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 | « samples/swarm/BiIterator.dart ('k') | samples/swarm/SwarmState.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/swarm/DataSource.dart
diff --git a/samples/swarm/DataSource.dart b/samples/swarm/DataSource.dart
index 541066dde7ab3f4411df8d9d9a187cc8bbf329e7..969f9d1aaf32fd3a95c891dd1d164a0eee55e76c 100644
--- a/samples/swarm/DataSource.dart
+++ b/samples/swarm/DataSource.dart
@@ -11,9 +11,9 @@ class Sections implements Collection<Section> {
operator [](int i) => _sections[i];
- int get length() => _sections.length;
+ int get length => _sections.length;
- List<String> get sectionTitles() =>
+ List<String> get sectionTitles =>
CollectionUtils.map(_sections, (s) => s.title);
void refresh() {
@@ -32,11 +32,11 @@ class Sections implements Collection<Section> {
Iterator<Section> iterator() => _sections.iterator();
// TODO(jimhug): Better support for switching between local dev and server.
- static bool get runningFromFile() {
+ static bool get runningFromFile {
return window.location.protocol.startsWith('file:');
}
- static String get home() {
+ static String get home {
// TODO(jmesserly): window.location.origin not available on Safari 4.
// Move this workaround to the DOM code. See bug 5389503.
return '${window.location.protocol}//${window.location.host}';
@@ -84,7 +84,7 @@ class Sections implements Collection<Section> {
return -1;
}
- List<Section> get sections() => _sections;
+ List<Section> get sections => _sections;
// Collection<Section> methods:
List map(f(Section element)) {
@@ -189,17 +189,17 @@ class Article {
[htmlBody = null, bool unread = true, this.error = false])
: unread = new ObservableValue<bool>(unread), this._htmlBody = htmlBody;
- String get htmlBody() {
+ String get htmlBody {
_ensureLoaded();
return _htmlBody;
}
- String get dataUri() {
+ String get dataUri {
return Uri.encodeComponent(id).replaceAll('%2F', '/').
replaceAll('%253A', '%3A');
}
- String get thumbUrl() {
+ String get thumbUrl {
if (!hasThumbnail) return null;
var home;
« no previous file with comments | « samples/swarm/BiIterator.dart ('k') | samples/swarm/SwarmState.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698