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

Side by Side Diff: net/tools/net_watcher/net_watcher.cc

Issue 15994010: net_watcher does not build in Ubuntu 13.04 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ifdef around the pragma for the windows build Created 7 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // This is a small utility that watches for and logs network changes. 5 // This is a small utility that watches for and logs network changes.
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 << ProxyConfigToString(config) << ", " 120 << ProxyConfigToString(config) << ", "
121 << ConfigAvailabilityToString(availability) << ")"; 121 << ConfigAvailabilityToString(availability) << ")";
122 } 122 }
123 123
124 private: 124 private:
125 DISALLOW_COPY_AND_ASSIGN(NetWatcher); 125 DISALLOW_COPY_AND_ASSIGN(NetWatcher);
126 }; 126 };
127 127
128 } // namespace 128 } // namespace
129 129
130 // From glib version 2.36 onwards, g_type_init is implicitly called and it is
131 // deprecated.
132 #if (defined(OS_LINUX) || defined(OS_OPENBSD)) && !defined(OS_CHROMEOS)
133 #pragma GCC diagnostic push
134 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
135 #endif
136
130 int main(int argc, char* argv[]) { 137 int main(int argc, char* argv[]) {
131 #if defined(OS_MACOSX) 138 #if defined(OS_MACOSX)
132 base::mac::ScopedNSAutoreleasePool pool; 139 base::mac::ScopedNSAutoreleasePool pool;
133 #endif 140 #endif
134 #if (defined(OS_LINUX) || defined(OS_OPENBSD)) && !defined(OS_CHROMEOS) 141 #if (defined(OS_LINUX) || defined(OS_OPENBSD)) && !defined(OS_CHROMEOS)
135 // Needed so ProxyConfigServiceLinux can use gconf. 142 // Needed so ProxyConfigServiceLinux can use gconf.
136 // Normally handled by BrowserMainLoop::InitializeToolkit(). 143 // Normally handled by BrowserMainLoop::InitializeToolkit().
137 g_type_init(); 144 g_type_init();
138 #endif 145 #endif
139 base::AtExitManager exit_manager; 146 base::AtExitManager exit_manager;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 proxy_config_service->RemoveObserver(&net_watcher); 195 proxy_config_service->RemoveObserver(&net_watcher);
189 196
190 // Uses |network_change_notifier|. 197 // Uses |network_change_notifier|.
191 net::NetworkChangeNotifier::RemoveDNSObserver(&net_watcher); 198 net::NetworkChangeNotifier::RemoveDNSObserver(&net_watcher);
192 net::NetworkChangeNotifier::RemoveConnectionTypeObserver(&net_watcher); 199 net::NetworkChangeNotifier::RemoveConnectionTypeObserver(&net_watcher);
193 net::NetworkChangeNotifier::RemoveIPAddressObserver(&net_watcher); 200 net::NetworkChangeNotifier::RemoveIPAddressObserver(&net_watcher);
194 net::NetworkChangeNotifier::RemoveNetworkChangeObserver(&net_watcher); 201 net::NetworkChangeNotifier::RemoveNetworkChangeObserver(&net_watcher);
195 202
196 return 0; 203 return 0;
197 } 204 }
205
206 #if (defined(OS_LINUX) || defined(OS_OPENBSD)) && !defined(OS_CHROMEOS)
207 #pragma GCC diagnostic pop
208 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698