Please go through the below articles for your understanding:
Visa offices outside Canada: Countries / Territories and corresponding Canadian visa offices
Applicants for Permanent Residence
You must select the visa office that serves your country of nationality or the country where you have been legally admitted for at least one year
http://www.cicnews.com/2011/01/understanding-r11-visa-office-submit-application-canadian-permanent-residency-01826.html
Here are a few examples that will clarify how the second provision of R11 as noted above is interpreted under Canadian immigration laws:
• You are a Nigerian citizen currently studying at a university in Australia. You arrived just one month ago and your study permit is valid for 3 years. As a citizen of Nigeria, you always have the option of indicating that you want your application processed at the Canadian visa office in Accra, Ghana (which is responsible for processing permanent residence applications from Nigeria). You also have the option of selecting the visa office in Sydney, Australia, because you have been granted legal status in Australia for more than 1 year and you are currently living there. It does not matter that you have not lived in Australia for one year.
• You are a citizen of India who initially entered the United States on an H1-B work permit valid for two years. After your work permit expired, you remained in the US without valid status and never left the country. As usual, you can select the visa office in New Delhi, India for the processing of your application. Given your circumstances, you can also choose the visa office in Buffalo, New York. This is because you were initially granted legal immigration status in the United States for more than 1 year and you never left the country.
• You are Jordanian national who was admitted to the United States on a visitor visa for 6 months. After your visa expired, you left the US for 2 months. You have now come back and again you have been admitted for 6 months on a visitor visa. You cannot have your application for permanent residence processed at the visa office in Buffalo, because you have not been granted 1 year of continuous legal status in the US. You can only choose to have your application processed at the visa office in Damascus, which is responsible for processing applications for Jordanian nationals.
http://www.cic.gc.ca/english/information/offices/apply-where.asp