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

Side by Side Diff: sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart

Issue 18577002: Reapply expanding overloaded functions into separate functions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 library dart.dom.indexed_db; 1 library dart.dom.indexed_db;
2 2
3 import 'dart:async'; 3 import 'dart:async';
4 import 'dart:html'; 4 import 'dart:html';
5 import 'dart:html_common'; 5 import 'dart:html_common';
6 import 'dart:typed_data'; 6 import 'dart:typed_data';
7 import 'dart:_js_helper' show Creates, Returns, JSName, Null; 7 import 'dart:_js_helper' show Creates, Returns, JSName, Null;
8 import 'dart:_foreign_helper' show JS; 8 import 'dart:_foreign_helper' show JS;
9 import 'dart:_interceptors' show Interceptor, JSExtendableArray; 9 import 'dart:_interceptors' show Interceptor, JSExtendableArray;
10 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 10 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 263
264 // TODO(sra): Ensure storeName_OR_storeNames is a string or List<String>, 264 // TODO(sra): Ensure storeName_OR_storeNames is a string or List<String>,
265 // and copy to JavaScript array if necessary. 265 // and copy to JavaScript array if necessary.
266 266
267 // Try and create a transaction with a string mode. Browsers that expect a 267 // Try and create a transaction with a string mode. Browsers that expect a
268 // numeric mode tend to convert the string into a number. This fails 268 // numeric mode tend to convert the string into a number. This fails
269 // silently, resulting in zero ('readonly'). 269 // silently, resulting in zero ('readonly').
270 return _transaction(storeName_OR_storeNames, mode); 270 return _transaction(storeName_OR_storeNames, mode);
271 } 271 }
272 272
273 Transaction transactionStore(String storeName, String mode) {
274 if (mode != 'readonly' && mode != 'readwrite') {
275 throw new ArgumentError(mode);
276 }
277 // Try and create a transaction with a string mode. Browsers that expect a
278 // numeric mode tend to convert the string into a number. This fails
279 // silently, resulting in zero ('readonly').
280 return _transaction(storeName, mode);
281 }
282
283 Transaction transactionList(List<String> storeNames, String mode) {
284 if (mode != 'readonly' && mode != 'readwrite') {
285 throw new ArgumentError(mode);
286 }
287 List storeNames_1 = convertDartToNative_StringArray(storeNames);
288 return _transaction(storeNames_1, mode);
289 }
290
291 Transaction transactionStores(DomStringList storeNames, String mode) {
292 if (mode != 'readonly' && mode != 'readwrite') {
293 throw new ArgumentError(mode);
294 }
295 return _transaction(storeNames, mode);
296 }
297
273 @JSName('transaction') 298 @JSName('transaction')
274 Transaction _transaction(stores, mode) native; 299 Transaction _transaction(stores, mode) native;
275 300
276 // To suppress missing implicit constructor warnings. 301 // To suppress missing implicit constructor warnings.
277 factory Database._() { throw new UnsupportedError("Not supported"); } 302 factory Database._() { throw new UnsupportedError("Not supported"); }
278 303
279 @DomName('IDBDatabase.abortEvent') 304 @DomName('IDBDatabase.abortEvent')
280 @DocsEditable() 305 @DocsEditable()
281 static const EventStreamProvider<Event> abortEvent = const EventStreamProvider <Event>('abort'); 306 static const EventStreamProvider<Event> abortEvent = const EventStreamProvider <Event>('abort');
282 307
(...skipping 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1310 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
1286 // for details. All rights reserved. Use of this source code is governed by a 1311 // for details. All rights reserved. Use of this source code is governed by a
1287 // BSD-style license that can be found in the LICENSE file. 1312 // BSD-style license that can be found in the LICENSE file.
1288 1313
1289 1314
1290 @DocsEditable() 1315 @DocsEditable()
1291 @DomName('IDBAny') 1316 @DomName('IDBAny')
1292 @deprecated // nonstandard 1317 @deprecated // nonstandard
1293 abstract class _IDBAny extends Interceptor native "IDBAny" { 1318 abstract class _IDBAny extends Interceptor native "IDBAny" {
1294 } 1319 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | sdk/lib/indexed_db/dartium/indexed_db_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698