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

Unified Diff: utils/archive/reader.dart

Issue 10824210: Fix the archive code so that it compiles in a stricter mode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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
« utils/archive/messaging.c ('K') | « utils/archive/reader.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/archive/reader.dart
diff --git a/utils/archive/reader.dart b/utils/archive/reader.dart
index 3a2830fecacb2828f2f96f7882a8ca35a9a1c10e..7a3bd42f8450087fc82ef832af706e732df11296 100644
--- a/utils/archive/reader.dart
+++ b/utils/archive/reader.dart
@@ -125,18 +125,29 @@ class ArchiveReader {
if (format.zip) pending.add(call(SUPPORT_FORMAT_ZIP, id));
}
- if (!filter.options.isEmpty) {
- pending.add(
- call(SET_FILTER_OPTIONS, id, [filter.options.serialize()]));
+ var addOption = (request, option) {
Bob Nystrom 2012/08/07 22:58:43 Function statement instead of expression: addOpti
nweiz 2012/08/07 23:06:59 Done.
+ var value;;
Bob Nystrom 2012/08/07 22:58:43 Double ;;
nweiz 2012/08/07 23:06:59 Done.
+ if (option.value == false || option.value == null) {
+ value = null;
+ } else if (option.value == true) {
+ value = '1';
+ } else {
+ value = option.value.toString();
+ }
+
+ pending.add(CALL(request, id, [module, option.name, value]));
+ };
+
+ for (var option in filter.options.all) {
+ addOption(SET_FILTER_OPTIONS, option);
}
- if (!format.options.isEmpty) {
- pending.add(
- call(SET_FORMAT_OPTIONS, id, [format.options.serialize()]));
+ for (var option in format.options.all) {
+ addOption(SET_FORMAT_OPTIONS, option);
}
- if (!options.isEmpty) {
- pending.add(call(SET_OPTIONS, id, [options.serialize()]));
+ for (var option in options.all) {
+ addOption(SET_OPTIONS, option);
}
return Futures.wait(pending);
« utils/archive/messaging.c ('K') | « utils/archive/reader.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698