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

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

Issue 2779893005: Continue to clean c_str() calls. (Closed)
Patch Set: Revert changes in font_service_app.cc Created 3 years, 8 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
« no previous file with comments | « remoting/client/jni/jni_client.cc ('k') | remoting/protocol/jingle_session.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/register_support_host_request.h" 5 #include "remoting/host/register_support_host_request.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 if (!lifetime_element) { 160 if (!lifetime_element) {
161 error << "<" << kSupportIdLifetimeTag 161 error << "<" << kSupportIdLifetimeTag
162 << "> is missing in the host registration response: " 162 << "> is missing in the host registration response: "
163 << response->Str(); 163 << response->Str();
164 *error_message = error.str(); 164 *error_message = error.str();
165 LOG(ERROR) << *error_message; 165 LOG(ERROR) << *error_message;
166 return; 166 return;
167 } 167 }
168 168
169 int lifetime_int; 169 int lifetime_int;
170 if (!base::StringToInt(lifetime_element->BodyText().c_str(), &lifetime_int) || 170 if (!base::StringToInt(lifetime_element->BodyText(), &lifetime_int) ||
171 lifetime_int <= 0) { 171 lifetime_int <= 0) {
172 error << "<" << kSupportIdLifetimeTag 172 error << "<" << kSupportIdLifetimeTag
173 << "> is malformed in the host registration response: " 173 << "> is malformed in the host registration response: "
174 << response->Str(); 174 << response->Str();
175 *error_message = error.str(); 175 *error_message = error.str();
176 LOG(ERROR) << *error_message; 176 LOG(ERROR) << *error_message;
177 return; 177 return;
178 } 178 }
179 179
180 *support_id = support_id_element->BodyText(); 180 *support_id = support_id_element->BodyText();
(...skipping 17 matching lines...) Expand all
198 // Cleanup state before calling the callback. 198 // Cleanup state before calling the callback.
199 request_.reset(); 199 request_.reset();
200 iq_sender_.reset(); 200 iq_sender_.reset();
201 signal_strategy_->RemoveListener(this); 201 signal_strategy_->RemoveListener(this);
202 signal_strategy_ = nullptr; 202 signal_strategy_ = nullptr;
203 203
204 base::ResetAndReturn(&callback_).Run(support_id, lifetime, error_message); 204 base::ResetAndReturn(&callback_).Run(support_id, lifetime, error_message);
205 } 205 }
206 206
207 } // namespace remoting 207 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/jni/jni_client.cc ('k') | remoting/protocol/jingle_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698