| Index: chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc
|
| diff --git a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc
|
| index dfcd2cbcb3e2fe0a4a86e7eddf0d8d356170ddbc..70464eaf99d4b80342a51ca520c7c148cec4eda2 100644
|
| --- a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc
|
| +++ b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc
|
| @@ -439,7 +439,7 @@ void MobileSetupHandler::HandleStartActivation(const base::ListValue* args) {
|
| if (!web_ui())
|
| return;
|
|
|
| - std::string path = web_ui()->GetWebContents()->GetURL().path();
|
| + base::StringPiece path = web_ui()->GetWebContents()->GetURL().path();
|
| if (path.empty())
|
| return;
|
|
|
| @@ -447,7 +447,8 @@ void MobileSetupHandler::HandleStartActivation(const base::ListValue* args) {
|
|
|
| type_ = TYPE_ACTIVATION;
|
| MobileActivator::GetInstance()->AddObserver(this);
|
| - MobileActivator::GetInstance()->InitiateActivation(path.substr(1));
|
| + MobileActivator::GetInstance()->InitiateActivation(
|
| + path.substr(1).as_string());
|
| }
|
|
|
| void MobileSetupHandler::HandleSetTransactionStatus(
|
| @@ -490,7 +491,7 @@ void MobileSetupHandler::HandleGetDeviceInfo(const base::ListValue* args) {
|
| if (!web_ui())
|
| return;
|
|
|
| - std::string path = web_ui()->GetWebContents()->GetURL().path();
|
| + base::StringPiece path = web_ui()->GetWebContents()->GetURL().path();
|
| if (path.empty())
|
| return;
|
|
|
| @@ -498,7 +499,8 @@ void MobileSetupHandler::HandleGetDeviceInfo(const base::ListValue* args) {
|
| NetworkHandler::Get()->network_state_handler();
|
| // TODO: Figure out why the path has an extra '/' in the front. (e.g. It is
|
| // '//service/5' instead of '/service/5'.
|
| - const NetworkState* network = nsh->GetNetworkState(path.substr(1));
|
| + const NetworkState* network =
|
| + nsh->GetNetworkState(path.substr(1).as_string());
|
| if (!network) {
|
| web_ui()->GetWebContents()->Close();
|
| return;
|
| @@ -559,7 +561,8 @@ void MobileSetupHandler::DefaultNetworkChanged(
|
| if (!web_ui())
|
| return;
|
|
|
| - std::string path = web_ui()->GetWebContents()->GetURL().path().substr(1);
|
| + std::string path =
|
| + web_ui()->GetWebContents()->GetURL().path().substr(1).as_string();
|
| if (path.empty())
|
| return;
|
|
|
| @@ -579,7 +582,8 @@ void MobileSetupHandler::NetworkConnectionStateChanged(
|
| if (!web_ui())
|
| return;
|
|
|
| - std::string path = web_ui()->GetWebContents()->GetURL().path().substr(1);
|
| + std::string path =
|
| + web_ui()->GetWebContents()->GetURL().path().substr(1).as_string();
|
| if (path.empty() || path != network->path())
|
| return;
|
|
|
|
|