Cane's parents are in London so he delivered the news to them in person at breakfast, earning a hug from his mother.
READ MORE
• New captain for Namibia clash
• Captain Cane: Following in McCaw's footsteps
An All Black since 2012, Cane, who has started 11 of his 25 tests was an obvious choice because of his mental strength and leadership role in the team, Hansen said.
"You go through the process of who could captain the team ... and obviously if you look at the immediate future, Ricko [McCaw] will come back and be the leader but after that you've got people like Kieran Read who might be the next full-time guy and ... you look at who is going to drop in after that," Hansen said.
Radio Sport: Malakai Fekitoa on playing alongside Sonny Bill Williams
"You look at someone like Liam for example who has got a lot of mana in the team and a lot of respect, but ... he's not going to be here next year. It's a good opportunity to future proof and give someone else an opportunity who we have a lot of faith in. If something happened to Reado next year and he wasn't available then we've got a guy who's actually had a go at it."
Hansen said Cane's leadership skills - firstly at the Chiefs and then the All Blacks - impressed him over time. Asked if Cane struck him as a future All Blacks captain when he first came into the side, though, and he said: "I could sit here and say yeah he did but I'd be bulls**ting you. I just thought he was a pretty special player.
Watch: Gregor Paul and Patrick McKendry on captain Cane
"It's an overwhelming thing coming into the All Blacks and special players sometimes don't make it. Sitting back and watching him - he had mental fortitude to cope with it pretty quickly and he thrived in the environment. After a while we thought he was capable of being a leader so we brought him into the leadership group and he's done a good job there."
Cane said he grew up watching McCaw, who will be on the bench at the Olympic Stadium on Friday morning NZT. "Just to play alongside him is a huge honour."
All Blacks team to play Namibia at the Olympic Stadium on Friday, kick-off 7am NZT is:
15. Colin Slade
14. Nehe Milner-Skudder
13. Malakai Fekitoa
12. Sonny Bill Williams
11. Julian Savea
10. Beauden Barrett
9. TJ Perenara
8 Victor Vito
7. Sam Cane (c)
6. Liam Messam
5. Sam Whitelock
4. Luke Romano
3. Charlie Faumuina
2. Codie Taylor
1. Ben Franks
Reserves
16. Keven Mealamu
17. Wyatt Crockett
18. Tony Woodcock
19. Kieran Read
20. Richie McCaw
21. Tawera Kerr-Barlow
22. Ma'a Nonu
23. Ben Smith
- By Patrick McKendry in London