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 "remoting/host/plugin/daemon_controller.h" | 5 #include "remoting/host/plugin/daemon_controller.h" |
6 | 6 |
7 #include <unistd.h> | 7 #include <unistd.h> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "base/values.h" | 24 #include "base/values.h" |
25 #include "net/base/net_util.h" | 25 #include "net/base/net_util.h" |
26 #include "remoting/host/host_config.h" | 26 #include "remoting/host/host_config.h" |
27 #include "remoting/host/json_host_config.h" | 27 #include "remoting/host/json_host_config.h" |
28 #include "remoting/host/usage_stats_consent.h" | 28 #include "remoting/host/usage_stats_consent.h" |
29 | 29 |
30 namespace remoting { | 30 namespace remoting { |
31 | 31 |
32 namespace { | 32 namespace { |
33 | 33 |
34 const char kDaemonScript[] = "me2me_virtual_host.py"; | 34 const char kDaemonScript[] = "me2me_virtual_host"; |
35 const int64 kDaemonTimeoutMs = 5000; | 35 const int64 kDaemonTimeoutMs = 5000; |
36 | 36 |
37 std::string GetMd5(const std::string& value) { | 37 std::string GetMd5(const std::string& value) { |
38 base::MD5Context ctx; | 38 base::MD5Context ctx; |
39 base::MD5Init(&ctx); | 39 base::MD5Init(&ctx); |
40 base::MD5Update(&ctx, value); | 40 base::MD5Update(&ctx, value); |
41 base::MD5Digest digest; | 41 base::MD5Digest digest; |
42 base::MD5Final(&digest, &ctx); | 42 base::MD5Final(&digest, &ctx); |
43 return StringToLowerASCII(base::HexEncode(digest.a, sizeof(digest.a))); | 43 return StringToLowerASCII(base::HexEncode(digest.a, sizeof(digest.a))); |
44 } | 44 } |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 done_callback.Run(result); | 285 done_callback.Run(result); |
286 } | 286 } |
287 | 287 |
288 } // namespace | 288 } // namespace |
289 | 289 |
290 scoped_ptr<DaemonController> remoting::DaemonController::Create() { | 290 scoped_ptr<DaemonController> remoting::DaemonController::Create() { |
291 return scoped_ptr<DaemonController>(new DaemonControllerLinux()); | 291 return scoped_ptr<DaemonController>(new DaemonControllerLinux()); |
292 } | 292 } |
293 | 293 |
294 } // namespace remoting | 294 } // namespace remoting |
OLD | NEW |