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

Side by Side Diff: courgette/encoded_program.cc

Issue 3052034: base: Rename EnvVarGetter to Environment. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: review 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
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>
11 11
12 #include "base/env_var.h" 12 #include "base/environment.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/scoped_ptr.h" 14 #include "base/scoped_ptr.h"
15 #include "base/string_util.h" 15 #include "base/string_util.h"
16 16
17 #include "courgette/courgette.h" 17 #include "courgette/courgette.h"
18 #include "courgette/streams.h" 18 #include "courgette/streams.h"
19 19
20 namespace courgette { 20 namespace courgette {
21 21
22 // Stream indexes. 22 // Stream indexes.
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 INCLUDE_REL32_INDEXES = 0x0020, 259 INCLUDE_REL32_INDEXES = 0x0020,
260 INCLUDE_OPS = 0x0100, 260 INCLUDE_OPS = 0x0100,
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::EnvVarGetter> env(base::EnvVarGetter::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->GetEnv("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) {
(...skipping 280 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

Powered by Google App Engine
This is Rietveld 408576698