Code: void HostPortAllocatorSession::SendSessionRequest(const std::string& host,
                                                   int port) {
   GURL url("https://" + host + ":" + base::IntToString(port) +
            GetSessionRequestUrl() + "&sn=1");
  scoped_ptr<UrlFetcher> url_fetcher(new UrlFetcher(url, UrlFetcher::GET));
   url_fetcher->SetRequestContext(url_context_);
  url_fetcher->SetHeader("X-Talk-Google-Relay-Auth", relay_token());
  url_fetcher->SetHeader("X-Google-Relay-Auth", relay_token());
  url_fetcher->SetHeader("X-Stream-Type", "chromoting");
  url_fetcher->Start(base::Bind(&HostPortAllocatorSession::OnSessionRequestDone,
                                base::Unretained(this), url_fetcher.get()));
   url_fetchers_.insert(url_fetcher.release());
 }

Commit Message: Remove UrlFetcher from remoting and use the one in net instead.

BUG=133790
TEST=Stop and restart the Me2Me host. It should still work.


Review URL: https://chromiumcodereview.appspot.com/10637008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143798 0039d316-1c4b-4281-b951-d872f2087c98
CWE ID: CWE-399
void HostPortAllocatorSession::SendSessionRequest(const std::string& host,
                                                   int port) {
   GURL url("https://" + host + ":" + base::IntToString(port) +
            GetSessionRequestUrl() + "&sn=1");
  scoped_ptr<net::URLFetcher> url_fetcher(
      net::URLFetcher::Create(url, net::URLFetcher::GET, this));
   url_fetcher->SetRequestContext(url_context_);
  url_fetcher->AddExtraRequestHeader(
      "X-Talk-Google-Relay-Auth: " + relay_token());
  url_fetcher->AddExtraRequestHeader("X-Google-Relay-Auth: " + relay_token());
  url_fetcher->AddExtraRequestHeader("X-Stream-Type: chromoting");
  url_fetcher->Start();
   url_fetchers_.insert(url_fetcher.release());
 }
