Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(342)

Side by Side Diff: remoting/host/desktop_environment_options.cc

Issue 2858813002: [Chromoting] Use ProcessStatsSender in host process
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/host/client_session_unittest.cc ('k') | remoting/host/host_session_options.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/desktop_environment_options.h" 5 #include "remoting/host/desktop_environment_options.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/optional.h" 10 #include "base/optional.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 return enable_user_interface_; 67 return enable_user_interface_;
68 } 68 }
69 69
70 void DesktopEnvironmentOptions::set_enable_user_interface(bool enabled) { 70 void DesktopEnvironmentOptions::set_enable_user_interface(bool enabled) {
71 enable_user_interface_ = enabled; 71 enable_user_interface_ = enabled;
72 } 72 }
73 73
74 void DesktopEnvironmentOptions::ApplyHostSessionOptions( 74 void DesktopEnvironmentOptions::ApplyHostSessionOptions(
75 const HostSessionOptions& options) { 75 const HostSessionOptions& options) {
76 #if defined(OS_WIN) 76 #if defined(OS_WIN)
77 base::Optional<std::string> directx_capturer = 77 base::Optional<bool> directx_capturer =
78 options.Get("DirectX-Capturer"); 78 options.GetBool("DirectX-Capturer");
79 if (directx_capturer) { 79 if (directx_capturer) {
80 desktop_capture_options_.set_allow_directx_capturer( 80 desktop_capture_options_.set_allow_directx_capturer(*directx_capturer);
81 *directx_capturer == "true");
82 } 81 }
83 #endif 82 #endif
84 // This field is for test purpose. Usually it should not be set to false. 83 // This field is for test purpose. Usually it should not be set to false.
85 base::Optional<std::string> detect_updated_region = 84 base::Optional<bool> detect_updated_region =
86 options.Get("Detect-Updated-Region"); 85 options.GetBool("Detect-Updated-Region");
87 if (detect_updated_region) { 86 if (detect_updated_region) {
88 desktop_capture_options_.set_detect_updated_region( 87 desktop_capture_options_.set_detect_updated_region(*detect_updated_region);
89 *detect_updated_region == "true");
90 } 88 }
91 } 89 }
92 90
93 } // namespace remoting 91 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/client_session_unittest.cc ('k') | remoting/host/host_session_options.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698