summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-25 00:33:05 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-25 00:33:05 +0000
commit6e29d6f3d7f6fca666ec11626933de272dc299e8 (patch)
tree8136bd20c2691ed140933e4443cbf5f889b1ced3 /remoting
parent9180d8a66e4e848cf0c6c2ad554d8b72059378f3 (diff)
downloadchromium_src-6e29d6f3d7f6fca666ec11626933de272dc299e8.zip
chromium_src-6e29d6f3d7f6fca666ec11626933de272dc299e8.tar.gz
chromium_src-6e29d6f3d7f6fca666ec11626933de272dc299e8.tar.bz2
Add scoped_ptr<>::PassAs<>().
The new PassAs<>() method can be used to explicitly upcast scoped_ptr instances. Review URL: http://codereview.chromium.org/9283028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118958 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/protocol/jingle_session_manager.cc2
-rw-r--r--remoting/protocol/pepper_session_manager.cc2
-rw-r--r--remoting/protocol/v1_authenticator.cc4
3 files changed, 4 insertions, 4 deletions
diff --git a/remoting/protocol/jingle_session_manager.cc b/remoting/protocol/jingle_session_manager.cc
index b92f0f4..b1cfb61 100644
--- a/remoting/protocol/jingle_session_manager.cc
+++ b/remoting/protocol/jingle_session_manager.cc
@@ -141,7 +141,7 @@ scoped_ptr<Session> JingleSessionManager::Connect(
jingle_session->SendSessionInitiate();
- return scoped_ptr<Session>(jingle_session.Pass());
+ return jingle_session.PassAs<Session>();
}
void JingleSessionManager::OnSessionCreate(
diff --git a/remoting/protocol/pepper_session_manager.cc b/remoting/protocol/pepper_session_manager.cc
index 09e0c66..78842570 100644
--- a/remoting/protocol/pepper_session_manager.cc
+++ b/remoting/protocol/pepper_session_manager.cc
@@ -79,7 +79,7 @@ scoped_ptr<Session> PepperSessionManager::Connect(
session->StartConnection(host_jid, authenticator.Pass(), config.Pass(),
state_change_callback);
sessions_[session->session_id_] = session.get();
- return scoped_ptr<Session>(session.Pass());
+ return session.PassAs<Session>();
}
void PepperSessionManager::Close() {
diff --git a/remoting/protocol/v1_authenticator.cc b/remoting/protocol/v1_authenticator.cc
index aa000e8..bff07b9 100644
--- a/remoting/protocol/v1_authenticator.cc
+++ b/remoting/protocol/v1_authenticator.cc
@@ -88,7 +88,7 @@ V1ClientAuthenticator::CreateChannelAuthenticator() const {
SslHmacChannelAuthenticator::CreateForClient(
remote_cert_, shared_secret_);
result->SetLegacyOneWayMode(SslHmacChannelAuthenticator::SEND_ONLY);
- return scoped_ptr<ChannelAuthenticator>(result.Pass());
+ return result.PassAs<ChannelAuthenticator>();
};
V1HostAuthenticator::V1HostAuthenticator(
@@ -161,7 +161,7 @@ V1HostAuthenticator::CreateChannelAuthenticator() const {
SslHmacChannelAuthenticator::CreateForHost(
local_cert_, local_private_key_.get(), shared_secret_);
result->SetLegacyOneWayMode(SslHmacChannelAuthenticator::RECEIVE_ONLY);
- return scoped_ptr<ChannelAuthenticator>(result.Pass());
+ return result.PassAs<ChannelAuthenticator>();
};
} // namespace remoting