|Colonialism in India and China|
Divide and Rule
India, as a nation state, did not exist before the colonization. India only exists as a product of decolonization. The existence of many small territories, many with long-established rivalries, enabled the colonials the ability to employ a divide and rule strategy, playing one (or many) kingdoms off against another, bankrupting many and creating a dependency on Company/Imperial protection amongst most of the rest. The British Empire in India - at least until 1858 - is better understood as a State-endorsed protection racket than an Empire or Colony in the usual sense (worth reading Gandhi on this point).
India is also much better placed geographically for trade with Europe (which up to the 20th century was all the mattered) than China and was rich in many of the same materials that were desirable to the European trade. Tea is a fabulous example. The British introduced tea production into India because it had the right environment but was much closer and much easier to trade with than China, where tea production originated.
China Being Carved
China by contrast - especially those parts of China that were wealthy or resource rich - was a far more unified State with few opportunities for divide and rule. China possessed significant military strength, to a point where it was unlikely for a long time that European powers would realistically seek to invade and rule.
China also closed its doors to trade dependencies. In many ways, China was self sufficient and, importantly, the Chinese ruling classes were, it seems, little tempted by the profit opportunities that trade with Europe offered. So frustrating was this closed shop mentality to the British that the Empire actually sought to impose - by violence - the Opium Trade on the Chinese (something they had wisely resisted), by means of the Opium Wars in the 1840's and 1860's. The destabilizing influence on the Chinese State left in the wake of these wars - and the increasing importance of the Pacific Trade as the West Coast of America opened up - created a toe hold in that the British won control of Hong-Kong and created concessions for trade in Shanghai. By this point in British colonial history, London had probably realized that the cost of maintaining a command and control land empire in China would be unsustainable (India was already very expensive to run) and that holding trading concessions was the most profitable approach.
China was never fully colonized, and for this reason many historians chose to name this period a "semi-colonialism" by the British Empire. However, India became a full colony of the British Crown.