Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(847)

Side by Side Diff: remoting/host/service_client.cc

Issue 15782010: Update remoting/ and jingle/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/remoting_me2me_host.cc ('k') | remoting/host/setup/start_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/service_client.h" 5 #include "remoting/host/service_client.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 void ServiceClient::Core::MakeGaiaRequest( 101 void ServiceClient::Core::MakeGaiaRequest(
102 net::URLFetcher::RequestType request_type, 102 net::URLFetcher::RequestType request_type,
103 const std::string& url_suffix, 103 const std::string& url_suffix,
104 const std::string& request_body, 104 const std::string& request_body,
105 const std::string& oauth_access_token, 105 const std::string& oauth_access_token,
106 ServiceClient::Delegate* delegate) { 106 ServiceClient::Delegate* delegate) {
107 delegate_ = delegate; 107 delegate_ = delegate;
108 request_.reset(net::URLFetcher::Create( 108 request_.reset(net::URLFetcher::Create(
109 0, GURL(chromoting_hosts_url_ + url_suffix), request_type, this)); 109 0, GURL(chromoting_hosts_url_ + url_suffix), request_type, this));
110 request_->SetRequestContext(request_context_getter_); 110 request_->SetRequestContext(request_context_getter_.get());
111 request_->SetUploadData("application/json; charset=UTF-8", request_body); 111 request_->SetUploadData("application/json; charset=UTF-8", request_body);
112 request_->AddExtraRequestHeader("Authorization: OAuth " + oauth_access_token); 112 request_->AddExtraRequestHeader("Authorization: OAuth " + oauth_access_token);
113 request_->Start(); 113 request_->Start();
114 } 114 }
115 115
116 // URLFetcher::Delegate implementation. 116 // URLFetcher::Delegate implementation.
117 void ServiceClient::Core::OnURLFetchComplete( 117 void ServiceClient::Core::OnURLFetchComplete(
118 const net::URLFetcher* source) { 118 const net::URLFetcher* source) {
119 HandleResponse(source); 119 HandleResponse(source);
120 request_.reset(); 120 request_.reset();
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 163 }
164 164
165 void ServiceClient::UnregisterHost( 165 void ServiceClient::UnregisterHost(
166 const std::string& host_id, 166 const std::string& host_id,
167 const std::string& oauth_access_token, 167 const std::string& oauth_access_token,
168 Delegate* delegate) { 168 Delegate* delegate) {
169 return core_->UnregisterHost(host_id, oauth_access_token, delegate); 169 return core_->UnregisterHost(host_id, oauth_access_token, delegate);
170 } 170 }
171 171
172 } // namespace gaia 172 } // namespace gaia
OLDNEW
« no previous file with comments | « remoting/host/remoting_me2me_host.cc ('k') | remoting/host/setup/start_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698