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

Side by Side Diff: net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc

Issue 183853011: Move TrimWhitespace to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | « net/ftp/ftp_util.cc ('k') | net/proxy/proxy_bypass_rules.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 "net/proxy/dhcp_proxy_script_adapter_fetcher_win.h" 5 #include "net/proxy/dhcp_proxy_script_adapter_fetcher_win.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 // do not NULL-terminate but may \n-terminate. 281 // do not NULL-terminate but may \n-terminate.
282 // 282 //
283 // Belt and suspenders and elastic waistband: First, ensure we 283 // Belt and suspenders and elastic waistband: First, ensure we
284 // NULL-terminate after nBytesData; this is the inner constructor 284 // NULL-terminate after nBytesData; this is the inner constructor
285 // with nBytesData as a parameter. Then, return only up to the 285 // with nBytesData as a parameter. Then, return only up to the
286 // first null in case of embedded NULLs; this is the outer 286 // first null in case of embedded NULLs; this is the outer
287 // constructor that takes the result of c_str() on the inner. If 287 // constructor that takes the result of c_str() on the inner. If
288 // the server is giving us back a buffer with embedded NULLs, 288 // the server is giving us back a buffer with embedded NULLs,
289 // something is broken anyway. Finally, trim trailing whitespace. 289 // something is broken anyway. Finally, trim trailing whitespace.
290 std::string result(std::string(data, count_bytes).c_str()); 290 std::string result(std::string(data, count_bytes).c_str());
291 TrimWhitespaceASCII(result, TRIM_TRAILING, &result); 291 base::TrimWhitespaceASCII(result, base::TRIM_TRAILING, &result);
292 return result; 292 return result;
293 } 293 }
294 294
295 } // namespace net 295 } // namespace net
OLDNEW
« no previous file with comments | « net/ftp/ftp_util.cc ('k') | net/proxy/proxy_bypass_rules.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698