| Index: google_apis/gaia/fake_gaia.cc
|
| diff --git a/google_apis/gaia/fake_gaia.cc b/google_apis/gaia/fake_gaia.cc
|
| index ce62f1f1703db8c5dd91fcf770e6483c8d8a787e..d4e3cd9af11d2a3b5e639e8613bd550ab3a26659 100644
|
| --- a/google_apis/gaia/fake_gaia.cc
|
| +++ b/google_apis/gaia/fake_gaia.cc
|
| @@ -31,8 +31,9 @@
|
| #include "url/third_party/mozilla/url_parse.h"
|
|
|
| #define REGISTER_RESPONSE_HANDLER(url, method) \
|
| - request_handlers_.insert(std::make_pair( \
|
| - url.path(), base::Bind(&FakeGaia::method, base::Unretained(this))))
|
| + request_handlers_.insert( \
|
| + std::make_pair(url.path().as_string(), \
|
| + base::Bind(&FakeGaia::method, base::Unretained(this))))
|
|
|
| #define REGISTER_PATH_RESPONSE_HANDLER(path, method) \
|
| request_handlers_.insert(std::make_pair( \
|
| @@ -305,9 +306,10 @@ std::unique_ptr<HttpResponse> FakeGaia::HandleRequest(
|
| // The scheme and host of the URL is actually not important but required to
|
| // get a valid GURL in order to parse |request.relative_url|.
|
| GURL request_url = GURL("http://localhost").Resolve(request.relative_url);
|
| - std::string request_path = request_url.path();
|
| + base::StringPiece request_path = request_url.path();
|
| std::unique_ptr<BasicHttpResponse> http_response(new BasicHttpResponse());
|
| - RequestHandlerMap::iterator iter = request_handlers_.find(request_path);
|
| + RequestHandlerMap::iterator iter =
|
| + request_handlers_.find(request_path.as_string());
|
| if (iter != request_handlers_.end()) {
|
| LOG(WARNING) << "Serving request " << request_path;
|
| iter->second.Run(request, http_response.get());
|
|
|