| 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 // This file implements a standalone host process for Me2Me. | 5 // This file implements a standalone host process for Me2Me. |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 } | 887 } |
| 888 | 888 |
| 889 // For non-Gmail Google accounts, the owner base JID differs from the email. | 889 // For non-Gmail Google accounts, the owner base JID differs from the email. |
| 890 // host_owner_ contains the base JID (used for authenticating clients), while | 890 // host_owner_ contains the base JID (used for authenticating clients), while |
| 891 // host_owner_email contains the account's email (used for UI and logs). | 891 // host_owner_email contains the account's email (used for UI and logs). |
| 892 if (!config.GetString(kHostOwnerEmailConfigPath, &host_owner_email_)) { | 892 if (!config.GetString(kHostOwnerEmailConfigPath, &host_owner_email_)) { |
| 893 host_owner_email_ = host_owner_; | 893 host_owner_email_ = host_owner_; |
| 894 } | 894 } |
| 895 | 895 |
| 896 // Allow offering of VP9 encoding to be overridden by the command-line. | 896 // Allow offering of VP9 encoding to be overridden by the command-line. |
| 897 if (CommandLine::ForCurrentProcess()->HasSwitch(kEnableVp9SwitchName)) { | 897 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kEnableVp9SwitchName)) { |
| 898 enable_vp9_ = true; | 898 enable_vp9_ = true; |
| 899 } else { | 899 } else { |
| 900 config.GetBoolean(kEnableVp9ConfigPath, &enable_vp9_); | 900 config.GetBoolean(kEnableVp9ConfigPath, &enable_vp9_); |
| 901 } | 901 } |
| 902 | 902 |
| 903 // Allow the command-line to override the size of the frame recorder buffer. | 903 // Allow the command-line to override the size of the frame recorder buffer. |
| 904 int frame_recorder_buffer_kb = 0; | 904 int frame_recorder_buffer_kb = 0; |
| 905 if (CommandLine::ForCurrentProcess()->HasSwitch( | 905 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 906 kFrameRecorderBufferKbName)) { | 906 kFrameRecorderBufferKbName)) { |
| 907 std::string switch_value = | 907 std::string switch_value = |
| 908 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 908 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 909 kFrameRecorderBufferKbName); | 909 kFrameRecorderBufferKbName); |
| 910 base::StringToInt(switch_value, &frame_recorder_buffer_kb); | 910 base::StringToInt(switch_value, &frame_recorder_buffer_kb); |
| 911 } else { | 911 } else { |
| 912 config.GetInteger(kFrameRecorderBufferKbConfigPath, | 912 config.GetInteger(kFrameRecorderBufferKbConfigPath, |
| 913 &frame_recorder_buffer_kb); | 913 &frame_recorder_buffer_kb); |
| 914 } | 914 } |
| 915 if (frame_recorder_buffer_kb > 0) { | 915 if (frame_recorder_buffer_kb > 0) { |
| 916 frame_recorder_buffer_size_ = 1024LL * frame_recorder_buffer_kb; | 916 frame_recorder_buffer_size_ = 1024LL * frame_recorder_buffer_kb; |
| 917 } | 917 } |
| 918 | 918 |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1503 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds)); | 1503 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds)); |
| 1504 new HostProcess(context.Pass(), &exit_code, &shutdown_watchdog); | 1504 new HostProcess(context.Pass(), &exit_code, &shutdown_watchdog); |
| 1505 | 1505 |
| 1506 // Run the main (also UI) message loop until the host no longer needs it. | 1506 // Run the main (also UI) message loop until the host no longer needs it. |
| 1507 message_loop.Run(); | 1507 message_loop.Run(); |
| 1508 | 1508 |
| 1509 return exit_code; | 1509 return exit_code; |
| 1510 } | 1510 } |
| 1511 | 1511 |
| 1512 } // namespace remoting | 1512 } // namespace remoting |
| OLD | NEW |