| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-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 "chrome/browser/sync/engine/syncapi.h" | 5 #include "chrome/browser/sync/engine/syncapi.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
| 10 #include <windows.h> | 10 #include <windows.h> |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 if (result < 0) { | 243 if (result < 0) { |
| 244 LOG(ERROR) << "select() returned unexpected result " << result; | 244 LOG(ERROR) << "select() returned unexpected result " << result; |
| 245 break; | 245 break; |
| 246 } | 246 } |
| 247 | 247 |
| 248 // If exit_pipe was written to, we're done. | 248 // If exit_pipe was written to, we're done. |
| 249 if (FD_ISSET(params_->exit_pipe[0], &rdfs)) { | 249 if (FD_ISSET(params_->exit_pipe[0], &rdfs)) { |
| 250 break; | 250 break; |
| 251 } | 251 } |
| 252 | 252 |
| 253 // If result is 0, select timed out. | 253 // If fd is set, the network address might have changed. |
| 254 if (FD_ISSET(fd, &rdfs)) { | 254 if (FD_ISSET(fd, &rdfs)) { |
| 255 char buf[4096]; | 255 char buf[4096]; |
| 256 struct iovec iov = { buf, sizeof(buf) }; | 256 struct iovec iov = { buf, sizeof(buf) }; |
| 257 struct sockaddr_nl sa; | 257 struct sockaddr_nl sa; |
| 258 | 258 |
| 259 struct msghdr msg = { (void *)&sa, sizeof(sa), &iov, 1, NULL, 0, 0 }; | 259 struct msghdr msg = { (void *)&sa, sizeof(sa), &iov, 1, NULL, 0, 0 }; |
| 260 recvmsg(fd, &msg, 0); | 260 recvmsg(fd, &msg, 0); |
| 261 | 261 |
| 262 params_->conn_mgr->CheckServerReachable(); | 262 params_->conn_mgr->CheckServerReachable(); |
| 263 } else { | 263 } else { |
| (...skipping 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1695 BaseTransaction::~BaseTransaction() { | 1695 BaseTransaction::~BaseTransaction() { |
| 1696 delete lookup_; | 1696 delete lookup_; |
| 1697 } | 1697 } |
| 1698 | 1698 |
| 1699 UserShare* SyncManager::GetUserShare() const { | 1699 UserShare* SyncManager::GetUserShare() const { |
| 1700 DCHECK(data_->initialized()) << "GetUserShare requires initialization!"; | 1700 DCHECK(data_->initialized()) << "GetUserShare requires initialization!"; |
| 1701 return data_->GetUserShare(); | 1701 return data_->GetUserShare(); |
| 1702 } | 1702 } |
| 1703 | 1703 |
| 1704 } // namespace sync_api | 1704 } // namespace sync_api |
| OLD | NEW |