Skip to content

Commit

Permalink
Removing static routes
Browse files Browse the repository at this point in the history
  • Loading branch information
jakearchibald committed Jun 18, 2013
1 parent 788982f commit 5c26b56
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 65 deletions.
37 changes: 0 additions & 37 deletions controller.js
Expand Up @@ -307,43 +307,6 @@ var ReadOnlyCacheList = (function () {
}; };
return ReadOnlyCacheList; return ReadOnlyCacheList;
})(); })();
var StaticRouter = (function (_super) {
__extends(StaticRouter, _super);
function StaticRouter() {
_super.apply(this, arguments);

}
StaticRouter.prototype.add = function (url, sources) {
};
StaticRouter.prototype.addCache = function (cache, fallbackSources) {
};
return StaticRouter;
})(Map);
var StaticRoute = (function () {
function StaticRoute() { }
return StaticRoute;
})();
var ResponseSource = (function () {
function ResponseSource() { }
ResponseSource.prototype.get = function () {
return acceptedResponse();
};
return ResponseSource;
})();
var CacheSource = (function (_super) {
__extends(CacheSource, _super);
function CacheSource(cacheName, url) {
_super.call(this);
}
return CacheSource;
})(ResponseSource);
var NetworkSource = (function (_super) {
__extends(NetworkSource, _super);
function NetworkSource(url) {
_super.call(this);
}
return NetworkSource;
})(ResponseSource);
var _URL = (function () { var _URL = (function () {
function _URL(url, base) { function _URL(url, base) {
} }
Expand Down
28 changes: 0 additions & 28 deletions controller.ts
Expand Up @@ -102,8 +102,6 @@ class ControllerScope extends SharedWorker {
// are replaceing (see InstalledEvent::previousVersion) // are replaceing (see InstalledEvent::previousVersion)
version: any = 0; // NOTE: versions must be structured-cloneable! version: any = 0; // NOTE: versions must be structured-cloneable!


staticRoutes: StaticRouter;

// //
// Events // Events
// //
Expand Down Expand Up @@ -464,32 +462,6 @@ class ReadOnlyCacheList {
} }
} }


class StaticRouter extends Map {
// when URL is a string & ends in *, it acts as a matching prefix
// sources can be ResponseSource, ResponsePromise, or Response, or String
// Strings can be 'network', which will fetch the current url from the network
add(url: any, sources: Array): void {};
// cache can be string name or cache object
// fallbackSources are tried if cache extraction fails
addCache(cache: any, fallbackSources: Array): void {};
}

class StaticRoute {
sources: Array;
}

class ResponseSource {
get(): ResponsePromise { return acceptedResponse() };
}

class CacheSource extends ResponseSource {
constructor(cacheName: String, url: any) { super(); };
}

class NetworkSource extends ResponseSource {
constructor(url: any) { super(); };
}

//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Utility Decls to make the TypeScript compiler happy // Utility Decls to make the TypeScript compiler happy
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 5c26b56

Please sign in to comment.