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

Side by Side Diff: base/env_var.h

Issue 1606007: Move EnvironmentVariableGetter from base/linux_util.h to base/env_var.h. Labe... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix windows build for good this time? Created 10 years, 8 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 | « base/base_paths_posix.cc ('k') | base/env_var.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef BASE_ENV_VAR_H_
6 #define BASE_ENV_VAR_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11
12 namespace base {
13
14 // These are used to derive mocks for unittests.
15 class EnvVarGetter {
16 public:
17 virtual ~EnvVarGetter() {}
18 // Gets an environment variable's value and stores it in |result|.
19 // Returns false if the key is unset.
20 virtual bool GetEnv(const char* variable_name, std::string* result) = 0;
21
22 // Syntactic sugar for GetEnv(variable_name, NULL);
23 virtual bool HasEnv(const char* variable_name) {
24 return GetEnv(variable_name, NULL);
25 }
26
27 // Create an instance of EnvVarGetter
28 static EnvVarGetter* Create();
29 };
30
31 } // namespace base
32
33 #endif // BASE_ENV_VAR_H_
OLDNEW
« no previous file with comments | « base/base_paths_posix.cc ('k') | base/env_var.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698