Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <errno.h> | 7 #include <errno.h> |
| 8 #include <fcntl.h> | 8 #include <fcntl.h> |
| 9 #if defined(USE_GCONF) | 9 #if defined(USE_GCONF) |
| 10 #include <gconf/gconf-client.h> | 10 #include <gconf/gconf-client.h> |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 540 ShutDown(); | 540 ShutDown(); |
| 541 } else { | 541 } else { |
| 542 LOG(WARNING) << "~SettingGetterImplGSettings: leaking gsettings client"; | 542 LOG(WARNING) << "~SettingGetterImplGSettings: leaking gsettings client"; |
| 543 client_ = NULL; | 543 client_ = NULL; |
| 544 } | 544 } |
| 545 } | 545 } |
| 546 DCHECK(!client_); | 546 DCHECK(!client_); |
| 547 } | 547 } |
| 548 | 548 |
| 549 bool SchemaExists(const char* schema_name) { | 549 bool SchemaExists(const char* schema_name) { |
| 550 const gchar* const* schemas = libgio_loader_.g_settings_list_schemas(); | 550 gchar **schemas; |
|
Paweł Hajdan Jr.
2014/04/28 11:02:49
Let's initialize this to NULL.
| |
| 551 | |
| 552 libgio_loader_.g_settings_schema_source_list_schemas | |
| 553 (g_settings_schema_source_get_default(), TRUE, &schemas, NULL); | |
|
Paweł Hajdan Jr.
2014/04/28 11:02:49
nit: This is weird wrapping, could you move "(" to
| |
| 551 while (*schemas) { | 554 while (*schemas) { |
| 552 if (strcmp(schema_name, static_cast<const char*>(*schemas)) == 0) | 555 if (strcmp(schema_name, static_cast<const char*>(*schemas)) == 0) |
| 553 return true; | 556 return true; |
| 554 schemas++; | 557 schemas++; |
| 555 } | 558 } |
| 556 return false; | 559 return false; |
| 557 } | 560 } |
| 558 | 561 |
| 559 // LoadAndCheckVersion() must be called *before* Init()! | 562 // LoadAndCheckVersion() must be called *before* Init()! |
| 560 bool LoadAndCheckVersion(base::Environment* env); | 563 bool LoadAndCheckVersion(base::Environment* env); |
| (...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1758 void ProxyConfigServiceLinux::RemoveObserver(Observer* observer) { | 1761 void ProxyConfigServiceLinux::RemoveObserver(Observer* observer) { |
| 1759 delegate_->RemoveObserver(observer); | 1762 delegate_->RemoveObserver(observer); |
| 1760 } | 1763 } |
| 1761 | 1764 |
| 1762 ProxyConfigService::ConfigAvailability | 1765 ProxyConfigService::ConfigAvailability |
| 1763 ProxyConfigServiceLinux::GetLatestProxyConfig(ProxyConfig* config) { | 1766 ProxyConfigServiceLinux::GetLatestProxyConfig(ProxyConfig* config) { |
| 1764 return delegate_->GetLatestProxyConfig(config); | 1767 return delegate_->GetLatestProxyConfig(config); |
| 1765 } | 1768 } |
| 1766 | 1769 |
| 1767 } // namespace net | 1770 } // namespace net |
| OLD | NEW |