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

Side by Side Diff: chrome/common/net/notifier/base/nethelpers.cc

Issue 1956001: Moved XMPP notifier library from chrome/browser/sync to chrome/common.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "build/build_config.h" 5 #include "build/build_config.h"
6 #include "chrome/browser/sync/notifier/base/nethelpers.h" 6 #include "chrome/common/net/notifier/base/nethelpers.h"
7 7
8 namespace notifier { 8 namespace notifier {
9 9
10 hostent* SafeGetHostByName(const char* hostname, hostent* host, 10 hostent* SafeGetHostByName(const char* hostname, hostent* host,
11 char* buffer, size_t buffer_len, 11 char* buffer, size_t buffer_len,
12 int* herrno) { 12 int* herrno) {
13 hostent* result = NULL; 13 hostent* result = NULL;
14 #if WIN32 14 #if WIN32
15 result = gethostbyname(hostname); 15 result = gethostbyname(hostname);
16 if (!result) { 16 if (!result) {
(...skipping 17 matching lines...) Expand all
34 #elif OS_LINUX 34 #elif OS_LINUX
35 // No need to free anything, we pass in a pointer to a struct. 35 // No need to free anything, we pass in a pointer to a struct.
36 #elif OS_MACOSX 36 #elif OS_MACOSX
37 freehostent(host); 37 freehostent(host);
38 #else 38 #else
39 #error "I don't know how to free a hostent on your system." 39 #error "I don't know how to free a hostent on your system."
40 #endif 40 #endif
41 } 41 }
42 42
43 } // namespace notifier 43 } // namespace notifier
OLDNEW
« no previous file with comments | « chrome/common/net/notifier/base/nethelpers.h ('k') | chrome/common/net/notifier/base/network_status_detector_task.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698