Index: net/tools/net_watcher/net_watcher.cc |
diff --git a/net/tools/net_watcher/net_watcher.cc b/net/tools/net_watcher/net_watcher.cc |
index 67eb124f8ac5f05e220a86812e698763ea410f6c..90fa77a81fc2f5290faeb8209e16fbcc2bbdcc48 100644 |
--- a/net/tools/net_watcher/net_watcher.cc |
+++ b/net/tools/net_watcher/net_watcher.cc |
@@ -21,7 +21,8 @@ |
#include "net/proxy/proxy_config_service.h" |
#include "net/proxy/proxy_service.h" |
-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_CHROMEOS) |
+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && \ |
+ !defined(OS_CHROMEOS) |
#include <glib-object.h> |
#endif |
@@ -77,12 +78,11 @@ const char* ConfigAvailabilityToString( |
} |
// The main observer class that logs network events. |
-class NetWatcher : |
- public net::NetworkChangeNotifier::IPAddressObserver, |
- public net::NetworkChangeNotifier::ConnectionTypeObserver, |
- public net::NetworkChangeNotifier::DNSObserver, |
- public net::NetworkChangeNotifier::NetworkChangeObserver, |
- public net::ProxyConfigService::Observer { |
+class NetWatcher : public net::NetworkChangeNotifier::IPAddressObserver, |
+ public net::NetworkChangeNotifier::ConnectionTypeObserver, |
+ public net::NetworkChangeNotifier::DNSObserver, |
+ public net::NetworkChangeNotifier::NetworkChangeObserver, |
+ public net::ProxyConfigService::Observer { |
public: |
NetWatcher() {} |
@@ -96,28 +96,24 @@ class NetWatcher : |
// net::NetworkChangeNotifier::ConnectionTypeObserver implementation. |
virtual void OnConnectionTypeChanged( |
net::NetworkChangeNotifier::ConnectionType type) OVERRIDE { |
- LOG(INFO) << "OnConnectionTypeChanged(" |
- << ConnectionTypeToString(type) << ")"; |
+ LOG(INFO) << "OnConnectionTypeChanged(" << ConnectionTypeToString(type) |
+ << ")"; |
} |
// net::NetworkChangeNotifier::DNSObserver implementation. |
- virtual void OnDNSChanged() OVERRIDE { |
- LOG(INFO) << "OnDNSChanged()"; |
- } |
+ virtual void OnDNSChanged() OVERRIDE { LOG(INFO) << "OnDNSChanged()"; } |
// net::NetworkChangeNotifier::NetworkChangeObserver implementation. |
virtual void OnNetworkChanged( |
net::NetworkChangeNotifier::ConnectionType type) OVERRIDE { |
- LOG(INFO) << "OnNetworkChanged(" |
- << ConnectionTypeToString(type) << ")"; |
+ LOG(INFO) << "OnNetworkChanged(" << ConnectionTypeToString(type) << ")"; |
} |
// net::ProxyConfigService::Observer implementation. |
virtual void OnProxyConfigChanged( |
const net::ProxyConfig& config, |
net::ProxyConfigService::ConfigAvailability availability) OVERRIDE { |
- LOG(INFO) << "OnProxyConfigChanged(" |
- << ProxyConfigToString(config) << ", " |
+ LOG(INFO) << "OnProxyConfigChanged(" << ProxyConfigToString(config) << ", " |
<< ConfigAvailabilityToString(availability) << ")"; |
} |
@@ -131,16 +127,18 @@ int main(int argc, char* argv[]) { |
#if defined(OS_MACOSX) |
base::mac::ScopedNSAutoreleasePool pool; |
#endif |
-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_CHROMEOS) |
- // g_type_init will be deprecated in 2.36. 2.35 is the development |
- // version for 2.36, hence do not call g_type_init starting 2.35. |
- // http://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#g-type-init |
+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && \ |
+ !defined(OS_CHROMEOS) |
+// g_type_init will be deprecated in 2.36. 2.35 is the development |
+// version for 2.36, hence do not call g_type_init starting 2.35. |
+// http://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#g-type-init |
#if !GLIB_CHECK_VERSION(2, 35, 0) |
// Needed so ProxyConfigServiceLinux can use gconf. |
// Normally handled by BrowserMainLoop::InitializeToolkit(). |
g_type_init(); |
#endif |
-#endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_CHROMEOS) |
+#endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && |
+ // !defined(OS_CHROMEOS) |
base::AtExitManager exit_manager; |
CommandLine::Init(argc, argv); |
logging::LoggingSettings settings; |
@@ -170,14 +168,13 @@ int main(int argc, char* argv[]) { |
LOG(INFO) << "Initial connection type: " |
<< ConnectionTypeToString( |
- network_change_notifier->GetCurrentConnectionType()); |
+ network_change_notifier->GetCurrentConnectionType()); |
{ |
net::ProxyConfig config; |
const net::ProxyConfigService::ConfigAvailability availability = |
proxy_config_service->GetLatestProxyConfig(&config); |
- LOG(INFO) << "Initial proxy config: " |
- << ProxyConfigToString(config) << ", " |
+ LOG(INFO) << "Initial proxy config: " << ProxyConfigToString(config) << ", " |
<< ConfigAvailabilityToString(availability); |
} |