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

Side by Side Diff: remoting/host/host_session_options.h

Issue 2615113005: [Chromoting] Use HostExperimentSessionPlugin in host (Closed)
Patch Set: Resolve review comments Created 3 years, 10 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/fake_desktop_environment.cc ('k') | remoting/host/host_session_options.cc » ('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 #ifndef REMOTING_PROTOCOL_HOST_SESSION_OPTIONS_H_ 5 #ifndef REMOTING_HOST_HOST_SESSION_OPTIONS_H_
6 #define REMOTING_PROTOCOL_HOST_SESSION_OPTIONS_H_ 6 #define REMOTING_HOST_HOST_SESSION_OPTIONS_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/optional.h" 12 #include "base/optional.h"
13 13
14 namespace remoting { 14 namespace remoting {
15 namespace protocol {
16 15
17 // Session based host options sending from client. This class parses and stores 16 // Session based host options sending from client. This class parses and stores
18 // session configuration from client side to control the behavior of other host 17 // session configuration from client side to control the behavior of other host
19 // components. 18 // components.
20 class HostSessionOptions final { 19 class HostSessionOptions final {
21 public: 20 public:
22 HostSessionOptions(); 21 HostSessionOptions();
23 ~HostSessionOptions(); 22 ~HostSessionOptions();
24 23
24 HostSessionOptions(const std::string& parameter);
25
25 // Appends one key-value pair into current instance. 26 // Appends one key-value pair into current instance.
26 void Append(const std::string& key, const std::string& value); 27 void Append(const std::string& key, const std::string& value);
27 28
28 // Retrieves the value of |key|. Returns a true Optional if |key| has been 29 // Retrieves the value of |key|. Returns a true Optional if |key| has been
29 // found, value of the Optional wil be set to corresponding value. 30 // found, value of the Optional wil be set to corresponding value.
30 base::Optional<std::string> Get(const std::string& key) const; 31 base::Optional<std::string> Get(const std::string& key) const;
31 32
32 // Returns a string to represent current instance. Consumers can rebuild an 33 // Returns a string to represent current instance. Consumers can rebuild an
33 // exactly same instance with Import() function. 34 // exactly same instance with Import() function.
34 std::string Export() const; 35 std::string Export() const;
35 36
36 // Overwrite current instance with |parameter|, which is a string returned by 37 // Overwrite current instance with |parameter|, which is a string returned by
37 // Export() function. So a parent process can send HostSessionOptions to a 38 // Export() function. So a parent process can send HostSessionOptions to a
38 // child process. 39 // child process.
39 void Import(const std::string& parameter); 40 void Import(const std::string& parameter);
40 41
41 private: 42 private:
42 std::map<std::string, std::string> options_; 43 std::map<std::string, std::string> options_;
43 44
44 HostSessionOptions(HostSessionOptions&&) = delete; 45 HostSessionOptions(HostSessionOptions&&) = delete;
45 HostSessionOptions& operator=(HostSessionOptions&&) = delete; 46 HostSessionOptions& operator=(HostSessionOptions&&) = delete;
46 DISALLOW_COPY_AND_ASSIGN(HostSessionOptions); 47 DISALLOW_COPY_AND_ASSIGN(HostSessionOptions);
47 }; 48 };
48 49
49 } // namespace protocol
50 } // namespace remoting 50 } // namespace remoting
51 51
52 #endif // REMOTING_PROTOCOL_HOST_SESSION_OPTIONS_H_ 52 #endif // REMOTING_HOST_HOST_SESSION_OPTIONS_H_
OLDNEW
« no previous file with comments | « remoting/host/fake_desktop_environment.cc ('k') | remoting/host/host_session_options.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698