| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * The base class that should be extended by all HTML applications. | 6 * The base class that should be extended by all HTML applications. |
| 7 * | 7 * |
| 8 * It should both be easy to use for users coming over from JavaScript, but | 8 * It should both be easy to use for users coming over from JavaScript, but |
| 9 * also offer a clear notion of OO encapsulation. | 9 * also offer a clear notion of OO encapsulation. |
| 10 * | 10 * |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 /** | 94 /** |
| 95 * Gets the server URL. This is needed when we are loaded from a packaged | 95 * Gets the server URL. This is needed when we are loaded from a packaged |
| 96 * Chrome app. | 96 * Chrome app. |
| 97 */ | 97 */ |
| 98 static String serverUrl(String url) { | 98 static String serverUrl(String url) { |
| 99 if (isPackaged) { | 99 if (isPackaged) { |
| 100 // TODO(jmesserly): Several problems with this: | 100 // TODO(jmesserly): Several problems with this: |
| 101 // * How do we authenticate against the server? | 101 // * How do we authenticate against the server? |
| 102 // * How do we talk to a server other than thump? | 102 // * How do we talk to a server other than thump? |
| 103 assert(url.startsWith('/')); | 103 assert(url.startsWith('/')); |
| 104 return 'http://thump.googleplex.com' + url; | 104 return 'http://thump.googleplex.com$url'; |
| 105 } else { | 105 } else { |
| 106 return url; | 106 return url; |
| 107 } | 107 } |
| 108 } | 108 } |
| 109 } | 109 } |
| OLD | NEW |