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

Side by Side Diff: courgette/encoded_program.cc

Issue 3029062: base: rename Environment::GetEnv to Environment::GetVar. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: Created 10 years, 4 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 | « chrome/test/startup/startup_test.cc ('k') | net/proxy/proxy_config_service_linux.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 INCLUDE_BYTES = 0x0200, 261 INCLUDE_BYTES = 0x0200,
262 INCLUDE_COPY_COUNTS = 0x0400, 262 INCLUDE_COPY_COUNTS = 0x0400,
263 INCLUDE_MISC = 0x1000 263 INCLUDE_MISC = 0x1000
264 }; 264 };
265 265
266 static FieldSelect GetFieldSelect() { 266 static FieldSelect GetFieldSelect() {
267 #if 1 267 #if 1
268 // TODO(sra): Use better configuration. 268 // TODO(sra): Use better configuration.
269 scoped_ptr<base::Environment> env(base::Environment::Create()); 269 scoped_ptr<base::Environment> env(base::Environment::Create());
270 std::string s; 270 std::string s;
271 env->GetEnv("A_FIELDS", &s); 271 env->GetVar("A_FIELDS", &s);
272 if (!s.empty()) { 272 if (!s.empty()) {
273 return static_cast<FieldSelect>(wcstoul(ASCIIToWide(s).c_str(), 0, 0)); 273 return static_cast<FieldSelect>(wcstoul(ASCIIToWide(s).c_str(), 0, 0));
274 } 274 }
275 #endif 275 #endif
276 return static_cast<FieldSelect>(~0); 276 return static_cast<FieldSelect>(~0);
277 } 277 }
278 278
279 void EncodedProgram::WriteTo(SinkStreamSet* streams) { 279 void EncodedProgram::WriteTo(SinkStreamSet* streams) {
280 FieldSelect select = GetFieldSelect(); 280 FieldSelect select = GetFieldSelect();
281 281
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 if (assembled) 560 if (assembled)
561 return C_OK; 561 return C_OK;
562 return C_ASSEMBLY_FAILED; 562 return C_ASSEMBLY_FAILED;
563 } 563 }
564 564
565 void DeleteEncodedProgram(EncodedProgram* encoded) { 565 void DeleteEncodedProgram(EncodedProgram* encoded) {
566 delete encoded; 566 delete encoded;
567 } 567 }
568 568
569 } // end namespace 569 } // end namespace
OLDNEW
« no previous file with comments | « chrome/test/startup/startup_test.cc ('k') | net/proxy/proxy_config_service_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698