A judge is only authorized to restrict an accused’s liberty in advance of trial based upon well founded concerns about flight ("the primary ground"), public safety ("the secondary ground") and/or maintaining confidence in the administration of justice ("the tertiary ground") (see Criminal Code s. 515(10)).
The apparent strength of the prosecution’s case is an important consideration for all three grounds. As J. Ellies states in R. v. Swaine,  O.J. No. 6108 (S.C.J.) at para. 8:
…Although the strength of the Crown's case is referred to only on the tertiary grounds set out in section 515(10)(c), it is relevant also to the primary and secondary grounds… An accused who is not facing the likelihood of a conviction is less motivated to fail to attend court or to interfere with the administration of justice, two considerations set out in the primary and secondary grounds in section 515(10). More importantly, it would be unfair to detain an accused who is likely to be acquitted….