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

Side by Side Diff: testing/android/native_test_util.cc

Issue 89243003: Move EmptyString, kWhitespace and the BOM to base. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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/url_request/url_request_unittest.cc ('k') | ui/compositor/compositor.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "testing/android/native_test_util.h" 5 #include "testing/android/native_test_util.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/strings/string_tokenizer.h" 9 #include "base/strings/string_tokenizer.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 11
12 namespace { 12 namespace {
13 13
14 void ParseArgsFromString(const std::string& command_line, 14 void ParseArgsFromString(const std::string& command_line,
15 std::vector<std::string>* args) { 15 std::vector<std::string>* args) {
16 base::StringTokenizer tokenizer(command_line, kWhitespaceASCII); 16 base::StringTokenizer tokenizer(command_line, base::kWhitespaceASCII);
17 tokenizer.set_quote_chars("\""); 17 tokenizer.set_quote_chars("\"");
18 while (tokenizer.GetNext()) { 18 while (tokenizer.GetNext()) {
19 std::string token; 19 std::string token;
20 RemoveChars(tokenizer.token(), "\"", &token); 20 RemoveChars(tokenizer.token(), "\"", &token);
21 args->push_back(token); 21 args->push_back(token);
22 } 22 }
23 } 23 }
24 24
25 } // namespace 25 } // namespace
26 26
(...skipping 18 matching lines...) Expand all
45 for (int i = 0; i < argc; ++i) { 45 for (int i = 0; i < argc; ++i) {
46 (*argv)[i] = const_cast<char*>(args[i].c_str()); 46 (*argv)[i] = const_cast<char*>(args[i].c_str());
47 } 47 }
48 (*argv)[argc] = NULL; // argv must be NULL terminated. 48 (*argv)[argc] = NULL; // argv must be NULL terminated.
49 49
50 return argc; 50 return argc;
51 } 51 }
52 52
53 } // namespace native_test_util 53 } // namespace native_test_util
54 } // namespace testing 54 } // namespace testing
OLDNEW
« no previous file with comments | « net/url_request/url_request_unittest.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698