| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chromeos/web_socket_proxy_controller.h" | 5 #include "chrome/browser/chromeos/web_socket_proxy_controller.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include <netinet/in.h> | 9 #include <netinet/in.h> |
| 10 #include <sys/wait.h> | 10 #include <sys/wait.h> |
| 11 #include <unistd.h> | 11 #include <unistd.h> |
| 12 | 12 |
| 13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 14 #include "base/lazy_instance.h" | 14 #include "base/lazy_instance.h" |
| 15 #include "base/message_loop.h" | 15 #include "base/message_loop.h" |
| 16 #include "base/string_tokenizer.h" | 16 #include "base/string_tokenizer.h" |
| 17 #include "base/threading/thread.h" | 17 #include "base/threading/thread.h" |
| 18 #include "chrome/browser/browser_process.h" | 18 #include "chrome/browser/browser_process.h" |
| 19 #include "chrome/browser/chromeos/web_socket_proxy.h" | 19 #include "chrome/browser/chromeos/web_socket_proxy.h" |
| 20 #include "chrome/common/chrome_notification_types.h" | 20 #include "chrome/common/chrome_notification_types.h" |
| 21 #include "chrome/common/chrome_switches.h" | 21 #include "chrome/common/chrome_switches.h" |
| 22 #include "chrome/common/extensions/extension.h" | 22 #include "chrome/common/extensions/extension.h" |
| 23 #include "chrome/common/url_constants.h" | 23 #include "chrome/common/url_constants.h" |
| 24 #include "content/browser/browser_thread.h" | 24 #include "content/browser/browser_thread.h" |
| 25 #include "content/common/notification_observer.h" | 25 #include "content/common/notification_observer.h" |
| 26 #include "content/common/notification_registrar.h" | 26 #include "content/common/notification_registrar.h" |
| 27 #include "content/common/notification_service.h" | 27 #include "content/common/notification_service.h" |
| 28 #include "content/common/url_constants.h" | 28 #include "content/public/common/url_constants.h" |
| 29 #include "googleurl/src/gurl.h" | 29 #include "googleurl/src/gurl.h" |
| 30 #include "net/base/network_change_notifier.h" | 30 #include "net/base/network_change_notifier.h" |
| 31 | 31 |
| 32 namespace { | 32 namespace { |
| 33 | 33 |
| 34 const char* kAllowedIds[] = { | 34 const char* kAllowedIds[] = { |
| 35 "haiffjcadagjlijoggckpgfnoeiflnem", | 35 "haiffjcadagjlijoggckpgfnoeiflnem", |
| 36 "gnedhmakppccajfpfiihfcdlnpgomkcf", | 36 "gnedhmakppccajfpfiihfcdlnpgomkcf", |
| 37 "fjcibdnjlbfnbfdjneajpipnlcppleek", | 37 "fjcibdnjlbfnbfdjneajpipnlcppleek", |
| 38 "okddffdblfhhnmhodogpojmfkjmhinfp" | 38 "okddffdblfhhnmhodogpojmfkjmhinfp" |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 bool WebSocketProxyController::CheckCredentials( | 211 bool WebSocketProxyController::CheckCredentials( |
| 212 const std::string& extension_id, | 212 const std::string& extension_id, |
| 213 const std::string& hostname, | 213 const std::string& hostname, |
| 214 unsigned short port, | 214 unsigned short port, |
| 215 ConnectionFlags flags) { | 215 ConnectionFlags flags) { |
| 216 return g_validator.Get().CheckCredentials( | 216 return g_validator.Get().CheckCredentials( |
| 217 extension_id, hostname, port, flags); | 217 extension_id, hostname, port, flags); |
| 218 } | 218 } |
| 219 | 219 |
| 220 } // namespace chromeos | 220 } // namespace chromeos |
| OLD | NEW |