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

Side by Side Diff: ppapi/native_client/src/trusted/plugin/pnacl_options.cc

Issue 16366009: Use a direct include of strings headers in ppapi/, printing/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: wrap comment 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 | « no previous file | ppapi/proxy/browser_font_resource_trusted.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 "native_client/src/trusted/plugin/pnacl_options.h" 5 #include "native_client/src/trusted/plugin/pnacl_options.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 #include <vector> 8 #include <vector>
9 9
10 #include "native_client/src/include/nacl_string.h" 10 #include "native_client/src/include/nacl_string.h"
(...skipping 27 matching lines...) Expand all
38 return; 38 return;
39 } 39 }
40 opt_level_ = l; 40 opt_level_ = l;
41 } 41 }
42 42
43 std::vector<char> PnaclOptions::GetOptCommandline() { 43 std::vector<char> PnaclOptions::GetOptCommandline() {
44 std::vector<char> result; 44 std::vector<char> result;
45 std::vector<nacl::string> tokens; 45 std::vector<nacl::string> tokens;
46 46
47 // Split the experimental_flags_ + the -On along whitespace. 47 // Split the experimental_flags_ + the -On along whitespace.
48 // Mostly a copy of "base/string_util.h", but avoid importing 48 // Mostly a copy of "base/strings/string_util.h", but avoid importing
49 // base into the PPAPI plugin for now. 49 // base into the PPAPI plugin for now.
50 nacl::string delim(" "); 50 nacl::string delim(" ");
51 nacl::string str = experimental_flags_; 51 nacl::string str = experimental_flags_;
52 52
53 if (opt_level_ != -1) { 53 if (opt_level_ != -1) {
54 nacl::stringstream ss; 54 nacl::stringstream ss;
55 // Cast as int so that it doesn't think it's a char. 55 // Cast as int so that it doesn't think it's a char.
56 ss << " -O" << static_cast<int>(opt_level_); 56 ss << " -O" << static_cast<int>(opt_level_);
57 str += ss.str(); 57 str += ss.str();
58 } 58 }
(...skipping 14 matching lines...) Expand all
73 nacl::string t = tokens[i]; 73 nacl::string t = tokens[i];
74 result.reserve(result.size() + t.size()); 74 result.reserve(result.size() + t.size());
75 std::copy(t.begin(), t.end(), std::back_inserter(result)); 75 std::copy(t.begin(), t.end(), std::back_inserter(result));
76 result.push_back('\x00'); 76 result.push_back('\x00');
77 } 77 }
78 78
79 return result; 79 return result;
80 } 80 }
81 81
82 } // namespace plugin 82 } // namespace plugin
OLDNEW
« no previous file with comments | « no previous file | ppapi/proxy/browser_font_resource_trusted.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698