| 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 "chrome/browser/extensions/api/dial/dial_service.h" | 5 #include "chrome/browser/extensions/api/dial/dial_service.h" | 
| 6 | 6 | 
| 7 #include <algorithm> | 7 #include <algorithm> | 
| 8 #include <set> | 8 #include <set> | 
| 9 #include <utility> | 9 #include <utility> | 
| 10 | 10 | 
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" | 
| 12 #include "base/callback.h" | 12 #include "base/callback.h" | 
| 13 #include "base/location.h" | 13 #include "base/location.h" | 
| 14 #include "base/logging.h" | 14 #include "base/logging.h" | 
| 15 #include "base/rand_util.h" | 15 #include "base/rand_util.h" | 
| 16 #include "base/single_thread_task_runner.h" | 16 #include "base/single_thread_task_runner.h" | 
| 17 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" | 
| 18 #include "base/strings/stringprintf.h" | 18 #include "base/strings/stringprintf.h" | 
| 19 #include "base/thread_task_runner_handle.h" | 19 #include "base/thread_task_runner_handle.h" | 
| 20 #include "base/time/time.h" | 20 #include "base/time/time.h" | 
| 21 #include "chrome/browser/extensions/api/dial/dial_device_data.h" | 21 #include "chrome/browser/extensions/api/dial/dial_device_data.h" | 
| 22 #include "components/version_info/version_info.h" | 22 #include "components/version_info/version_info.h" | 
| 23 #include "content/public/browser/browser_thread.h" | 23 #include "content/public/browser/browser_thread.h" | 
| 24 #include "net/base/completion_callback.h" | 24 #include "net/base/completion_callback.h" | 
| 25 #include "net/base/io_buffer.h" | 25 #include "net/base/io_buffer.h" | 
| 26 #include "net/base/ip_endpoint.h" | 26 #include "net/base/ip_endpoint.h" | 
| 27 #include "net/base/net_errors.h" | 27 #include "net/base/net_errors.h" | 
| 28 #include "net/base/net_util.h" | 28 #include "net/base/net_util.h" | 
|  | 29 #include "net/base/network_interfaces.h" | 
| 29 #include "net/http/http_response_headers.h" | 30 #include "net/http/http_response_headers.h" | 
| 30 #include "net/http/http_util.h" | 31 #include "net/http/http_util.h" | 
| 31 #include "url/gurl.h" | 32 #include "url/gurl.h" | 
| 32 #if defined(OS_CHROMEOS) | 33 #if defined(OS_CHROMEOS) | 
| 33 #include "chromeos/network/network_state.h" | 34 #include "chromeos/network/network_state.h" | 
| 34 #include "chromeos/network/network_state_handler.h" | 35 #include "chromeos/network/network_state_handler.h" | 
| 35 #include "third_party/cros_system_api/dbus/service_constants.h" | 36 #include "third_party/cros_system_api/dbus/service_constants.h" | 
| 36 #endif | 37 #endif | 
| 37 | 38 | 
| 38 using base::Time; | 39 using base::Time; | 
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 620   for (ScopedVector<DialSocket>::const_iterator iter = dial_sockets_.begin(); | 621   for (ScopedVector<DialSocket>::const_iterator iter = dial_sockets_.begin(); | 
| 621        iter != dial_sockets_.end(); | 622        iter != dial_sockets_.end(); | 
| 622        ++iter) { | 623        ++iter) { | 
| 623     if (!((*iter)->IsClosed())) | 624     if (!((*iter)->IsClosed())) | 
| 624       return true; | 625       return true; | 
| 625   } | 626   } | 
| 626   return false; | 627   return false; | 
| 627 } | 628 } | 
| 628 | 629 | 
| 629 }  // namespace extensions | 630 }  // namespace extensions | 
| OLD | NEW | 
|---|