Fast deploy over USB

This patch enables the fast deployment but only over USB. This implementation of the fast deployment doesn't support yet cross session capabilities.
To explain this a little bit (assuming I understood your question
correctly): there can be two usages for a returned Future -- either to
return an actual delayed value to the caller, or to simply indicate that
the work has been completed. In the first case, we always specify the type
of the value returned -- Future<String>, in the latter case we just return
Future, which, when normalized, means Future<dynamic>, which means
"anything". So in this latter case (which also covers the code here) you
can return any leaf function call that returns a Future of any type: it's
enough for the caller to know what it wants to know (that the work has been
completed).


On Tue, Aug 5, 2014 at 2:42 PM, Albu Alexandru <notifications@github.com>
wrote:

> In ide/app/lib/workspace_utils.dart:
>
> > +    return "0";
> > +  });
> > +}
> > +
> > +/**
> > + * This method sets the deployment time for a project.
> > + * The deployment time is saved in the local storage in order to be accessible
> > + * across sessions.
> > + */
> > +Future setDeploymentTime(String projName, int time) {
> > +  return preferences.localStore.getValue("deployment-time").then((String mapTime) {
> > +    Map<String, String> depTime = JSON.decode(mapTime);
> > +    depTime[projName]=time.toString();
> > +    return preferences.localStore.setValue("deployment-time", JSON.encode(depTime)).
> > +        then((_) {
> > +      return null;
>
> Yes my intent was to return null all the time because otherwise the result
> would have a different meaning as expected by the caller. If you think
> there is a better way to achieve that please let me know
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/dart-lang/chromedeveditor/pull/3062/files#r15843930>.
>