| OLD | NEW |
| 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 "net/proxy/proxy_config_service_linux.h" | 5 #include "net/proxy/proxy_config_service_linux.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 virtual bool GetEnv(const char* variable_name, std::string* result) { | 108 virtual bool GetEnv(const char* variable_name, std::string* result) { |
| 109 const char* env_value = table.Get(variable_name); | 109 const char* env_value = table.Get(variable_name); |
| 110 if (env_value) { | 110 if (env_value) { |
| 111 // Note that the variable may be defined but empty. | 111 // Note that the variable may be defined but empty. |
| 112 *result = env_value; | 112 *result = env_value; |
| 113 return true; | 113 return true; |
| 114 } | 114 } |
| 115 return false; | 115 return false; |
| 116 } | 116 } |
| 117 | 117 |
| 118 virtual bool SetEnv(const char* variable_name, const std::string& new_value) { | 118 virtual bool SetVar(const char* variable_name, const std::string& new_value) { |
| 119 ADD_FAILURE(); | 119 ADD_FAILURE(); |
| 120 return false; | 120 return false; |
| 121 } | 121 } |
| 122 | 122 |
| 123 virtual bool UnSetVar(const char* variable_name) { | 123 virtual bool UnSetVar(const char* variable_name) { |
| 124 ADD_FAILURE(); | 124 ADD_FAILURE(); |
| 125 return false; | 125 return false; |
| 126 } | 126 } |
| 127 // End base::Environment implementation. | 127 // End base::Environment implementation. |
| 128 | 128 |
| (...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1400 new ProxyConfigServiceLinux(env)); | 1400 new ProxyConfigServiceLinux(env)); |
| 1401 ProxyConfig config; | 1401 ProxyConfig config; |
| 1402 sync_config_getter.SetupAndInitialFetch(); | 1402 sync_config_getter.SetupAndInitialFetch(); |
| 1403 sync_config_getter.SyncGetLatestProxyConfig(&config); | 1403 sync_config_getter.SyncGetLatestProxyConfig(&config); |
| 1404 EXPECT_TRUE(config.auto_detect()); | 1404 EXPECT_TRUE(config.auto_detect()); |
| 1405 EXPECT_EQ(GURL(), config.pac_url()); | 1405 EXPECT_EQ(GURL(), config.pac_url()); |
| 1406 } | 1406 } |
| 1407 } | 1407 } |
| 1408 | 1408 |
| 1409 } // namespace net | 1409 } // namespace net |
| OLD | NEW |