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

Side by Side Diff: courgette/encoded_program.cc

Issue 112963005: Update uses of UTF conversions in courgette/, device/, extensions/, google_apis/, gpu/, ipc/, media… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 | device/bluetooth/bluetooth_chromeos_unittest.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "courgette/encoded_program.h" 5 #include "courgette/encoded_program.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 INCLUDE_MISC = 0x1000 293 INCLUDE_MISC = 0x1000
294 }; 294 };
295 295
296 static FieldSelect GetFieldSelect() { 296 static FieldSelect GetFieldSelect() {
297 #if 1 297 #if 1
298 // TODO(sra): Use better configuration. 298 // TODO(sra): Use better configuration.
299 scoped_ptr<base::Environment> env(base::Environment::Create()); 299 scoped_ptr<base::Environment> env(base::Environment::Create());
300 std::string s; 300 std::string s;
301 env->GetVar("A_FIELDS", &s); 301 env->GetVar("A_FIELDS", &s);
302 if (!s.empty()) { 302 if (!s.empty()) {
303 return static_cast<FieldSelect>(wcstoul(ASCIIToWide(s).c_str(), 0, 0)); 303 return static_cast<FieldSelect>(
304 wcstoul(base::ASCIIToWide(s).c_str(), 0, 0));
304 } 305 }
305 #endif 306 #endif
306 return static_cast<FieldSelect>(~0); 307 return static_cast<FieldSelect>(~0);
307 } 308 }
308 309
309 CheckBool EncodedProgram::WriteTo(SinkStreamSet* streams) { 310 CheckBool EncodedProgram::WriteTo(SinkStreamSet* streams) {
310 FieldSelect select = GetFieldSelect(); 311 FieldSelect select = GetFieldSelect();
311 312
312 // The order of fields must be consistent in WriteTo and ReadFrom, regardless 313 // The order of fields must be consistent in WriteTo and ReadFrom, regardless
313 // of the streams used. The code can be configured with all kStreamXXX 314 // of the streams used. The code can be configured with all kStreamXXX
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 if (assembled) 793 if (assembled)
793 return C_OK; 794 return C_OK;
794 return C_ASSEMBLY_FAILED; 795 return C_ASSEMBLY_FAILED;
795 } 796 }
796 797
797 void DeleteEncodedProgram(EncodedProgram* encoded) { 798 void DeleteEncodedProgram(EncodedProgram* encoded) {
798 delete encoded; 799 delete encoded;
799 } 800 }
800 801
801 } // end namespace 802 } // end namespace
OLDNEW
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698