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

Unified Diff: remoting/protocol/session_config.h

Issue 7796026: Pass SessionConfig by reference instead of pointer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: remoting/protocol/session_config.h
diff --git a/remoting/protocol/session_config.h b/remoting/protocol/session_config.h
index 81e4238d11a574b6b53ae5c3bf4801ee1f2f289b..3e3f44e7177c751299bf3dbb15f2cd1f0c6966bf 100644
--- a/remoting/protocol/session_config.h
+++ b/remoting/protocol/session_config.h
@@ -61,6 +61,7 @@ struct ScreenResolution {
// chromotocol configuration.
class SessionConfig {
public:
+ SessionConfig();
~SessionConfig();
const ChannelConfig& control_config() const { return control_config_; }
@@ -75,15 +76,9 @@ class SessionConfig {
void SetVideoConfig(const ChannelConfig& video_config);
void SetInitialResolution(const ScreenResolution& initial_resolution);
- SessionConfig* Clone() const;
-
- static SessionConfig* CreateDefault();
+ static SessionConfig GetDefault();
private:
- SessionConfig();
- explicit SessionConfig(const SessionConfig& config);
- SessionConfig& operator=(const SessionConfig& b);
-
ChannelConfig control_config_;
ChannelConfig event_config_;
ChannelConfig video_config_;
@@ -133,22 +128,23 @@ class CandidateSessionConfig {
// NULL is returned if such configuration doesn't exist. When selecting
// channel configuration priority is given to the configs listed first
// in |client_config|.
- SessionConfig* Select(const CandidateSessionConfig* client_config,
- bool force_host_resolution);
+ bool Select(const CandidateSessionConfig* client_config,
+ bool force_host_resolution,
+ SessionConfig* result);
// Returns true if |config| is supported.
- bool IsSupported(const SessionConfig* config) const;
+ bool IsSupported(const SessionConfig& config) const;
// Extracts final protocol configuration. Must be used for the description
// received in the session-accept stanza. If the selection is ambiguous
// (e.g. there is more than one configuration for one of the channel)
// or undefined (e.g. no configurations for a channel) then NULL is returned.
- SessionConfig* GetFinalConfig() const;
+ bool GetFinalConfig(SessionConfig* result) const;
CandidateSessionConfig* Clone() const;
static CandidateSessionConfig* CreateEmpty();
- static CandidateSessionConfig* CreateFrom(const SessionConfig* config);
+ static CandidateSessionConfig* CreateFrom(const SessionConfig& config);
static CandidateSessionConfig* CreateDefault();
private:

Powered by Google App Engine
This is Rietveld 408576698