diff options
Diffstat (limited to 'remoting/host')
-rw-r--r-- | remoting/host/capturer.cc | 8 | ||||
-rw-r--r-- | remoting/host/capturer.h | 4 | ||||
-rw-r--r-- | remoting/host/chromoting_host.cc | 6 | ||||
-rw-r--r-- | remoting/host/chromoting_host.h | 2 | ||||
-rw-r--r-- | remoting/host/in_memory_host_config.cc | 8 | ||||
-rw-r--r-- | remoting/host/in_memory_host_config.h | 4 | ||||
-rw-r--r-- | remoting/host/json_host_config.cc | 5 | ||||
-rw-r--r-- | remoting/host/json_host_config.h | 1 |
8 files changed, 19 insertions, 19 deletions
diff --git a/remoting/host/capturer.cc b/remoting/host/capturer.cc index 3e32070..cf1bac7 100644 --- a/remoting/host/capturer.cc +++ b/remoting/host/capturer.cc @@ -38,7 +38,7 @@ media::VideoFrame::Format Capturer::pixel_format() const { } void Capturer::ClearInvalidRects() { - AutoLock auto_inval_rects_lock(inval_rects_lock_); + base::AutoLock auto_inval_rects_lock(inval_rects_lock_); inval_rects_.clear(); } @@ -48,13 +48,13 @@ void Capturer::InvalidateRects(const InvalidRects& inval_rects) { inval_rects.begin(), inval_rects.end(), std::inserter(temp_rects, temp_rects.begin())); { - AutoLock auto_inval_rects_lock(inval_rects_lock_); + base::AutoLock auto_inval_rects_lock(inval_rects_lock_); inval_rects_.swap(temp_rects); } } void Capturer::InvalidateFullScreen() { - AutoLock auto_inval_rects_lock(inval_rects_lock_); + base::AutoLock auto_inval_rects_lock(inval_rects_lock_); inval_rects_.clear(); inval_rects_.insert(gfx::Rect(0, 0, width_, height_)); } @@ -68,7 +68,7 @@ void Capturer::CaptureInvalidRects(CaptureCompletedCallback* callback) { // Braced to scope the lock. InvalidRects local_rects; { - AutoLock auto_inval_rects_lock(inval_rects_lock_); + base::AutoLock auto_inval_rects_lock(inval_rects_lock_); local_rects.swap(inval_rects_); } diff --git a/remoting/host/capturer.h b/remoting/host/capturer.h index 548b685..1282ebe 100644 --- a/remoting/host/capturer.h +++ b/remoting/host/capturer.h @@ -7,7 +7,7 @@ #include "base/basictypes.h" #include "base/callback.h" -#include "base/lock.h" +#include "base/synchronization/lock.h" #include "base/task.h" #include "remoting/base/capture_data.h" #include "remoting/base/types.h" @@ -138,7 +138,7 @@ class Capturer { InvalidRects inval_rects_; // A lock protecting |inval_rects_| across threads. - Lock inval_rects_lock_; + base::Lock inval_rects_lock_; }; } // namespace remoting diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc index a06098c..45be613 100644 --- a/remoting/host/chromoting_host.cc +++ b/remoting/host/chromoting_host.cc @@ -70,7 +70,7 @@ void ChromotingHost::Start(Task* shutdown_task) { // Make sure this object is not started. { - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); if (state_ != kInitial) return; state_ = kStarted; @@ -113,7 +113,7 @@ void ChromotingHost::Shutdown() { // No-op if this object is not started yet. { - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); if (state_ != kStarted) { state_ = kStopped; return; @@ -264,7 +264,7 @@ void ChromotingHost::OnStateChange(JingleClient* jingle_client, void ChromotingHost::OnNewClientSession( protocol::Session* session, protocol::SessionManager::IncomingSessionResponse* response) { - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); // TODO(hclam): Allow multiple clients to connect to the host. if (connection_.get() || state_ != kStarted) { *response = protocol::SessionManager::DECLINE; diff --git a/remoting/host/chromoting_host.h b/remoting/host/chromoting_host.h index bc470e7..33680a6 100644 --- a/remoting/host/chromoting_host.h +++ b/remoting/host/chromoting_host.h @@ -174,7 +174,7 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>, State state_; // Lock is to lock the access to |state_|. - Lock lock_; + base::Lock lock_; // Configuration of the protocol. scoped_ptr<protocol::CandidateSessionConfig> protocol_config_; diff --git a/remoting/host/in_memory_host_config.cc b/remoting/host/in_memory_host_config.cc index 7827b8f..253b563 100644 --- a/remoting/host/in_memory_host_config.cc +++ b/remoting/host/in_memory_host_config.cc @@ -17,12 +17,12 @@ InMemoryHostConfig::~InMemoryHostConfig() {} bool InMemoryHostConfig::GetString(const std::string& path, std::string* out_value) { - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); return values_->GetString(path, out_value); } bool InMemoryHostConfig::GetBoolean(const std::string& path, bool* out_value) { - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); return values_->GetBoolean(path, out_value); } @@ -32,12 +32,12 @@ void InMemoryHostConfig::Save() { void InMemoryHostConfig::SetString(const std::string& path, const std::string& in_value) { - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); values_->SetString(path, in_value); } void InMemoryHostConfig::SetBoolean(const std::string& path, bool in_value) { - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); values_->SetBoolean(path, in_value); } diff --git a/remoting/host/in_memory_host_config.h b/remoting/host/in_memory_host_config.h index 1078c50..998580a 100644 --- a/remoting/host/in_memory_host_config.h +++ b/remoting/host/in_memory_host_config.h @@ -7,9 +7,9 @@ #include <string> -#include "base/lock.h" #include "base/ref_counted.h" #include "base/scoped_ptr.h" +#include "base/synchronization/lock.h" #include "remoting/host/host_config.h" class DictionaryValue; @@ -34,7 +34,7 @@ class InMemoryHostConfig : public MutableHostConfig { protected: // |lock_| must be locked whenever |values_| is used. - Lock lock_; + base::Lock lock_; scoped_ptr<DictionaryValue> values_; private: diff --git a/remoting/host/json_host_config.cc b/remoting/host/json_host_config.cc index ab639f0..36b39f2e 100644 --- a/remoting/host/json_host_config.cc +++ b/remoting/host/json_host_config.cc @@ -8,6 +8,7 @@ #include "base/json/json_reader.h" #include "base/json/json_writer.h" #include "base/message_loop_proxy.h" +#include "base/synchronization/lock.h" #include "base/task.h" #include "base/values.h" @@ -35,7 +36,7 @@ bool JsonHostConfig::Read() { } DictionaryValue* dictionary = static_cast<DictionaryValue*>(value.release()); - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); values_.reset(dictionary); return true; } @@ -47,7 +48,7 @@ void JsonHostConfig::Save() { void JsonHostConfig::DoWrite() { std::string file_content; - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); base::JSONWriter::Write(values_.get(), true, &file_content); // TODO(sergeyu): Move ImportantFileWriter to base and use it here. file_util::WriteFile(filename_, file_content.c_str(), file_content.size()); diff --git a/remoting/host/json_host_config.h b/remoting/host/json_host_config.h index b4e2912..d9f233b 100644 --- a/remoting/host/json_host_config.h +++ b/remoting/host/json_host_config.h @@ -8,7 +8,6 @@ #include <string> #include "base/file_path.h" -#include "base/lock.h" #include "base/ref_counted.h" #include "base/scoped_ptr.h" #include "remoting/host/in_memory_host_config.h" |