diff options
-rw-r--r-- | remoting/host/it2me/it2me_native_messaging_host.cc | 2 | ||||
-rw-r--r-- | remoting/host/pairing_registry_delegate_win.cc | 2 | ||||
-rw-r--r-- | remoting/host/setup/daemon_controller_delegate_win.cc | 2 | ||||
-rw-r--r-- | remoting/host/setup/me2me_native_messaging_host.cc | 2 | ||||
-rw-r--r-- | remoting/host/token_validator_base.cc | 3 |
5 files changed, 5 insertions, 6 deletions
diff --git a/remoting/host/it2me/it2me_native_messaging_host.cc b/remoting/host/it2me/it2me_native_messaging_host.cc index e56dd7a..8d0d131 100644 --- a/remoting/host/it2me/it2me_native_messaging_host.cc +++ b/remoting/host/it2me/it2me_native_messaging_host.cc @@ -87,7 +87,7 @@ void It2MeNativeMessagingHost::Start(const base::Closure& quit_closure) { void It2MeNativeMessagingHost::OnMessage(scoped_ptr<base::Value> message) { DCHECK(task_runner()->BelongsToCurrentThread()); - if (message->GetType() != base::Value::TYPE_DICTIONARY) { + if (!message->IsType(base::Value::TYPE_DICTIONARY)) { LOG(ERROR) << "Received a message that's not a dictionary."; channel_->SendMessage(nullptr); return; diff --git a/remoting/host/pairing_registry_delegate_win.cc b/remoting/host/pairing_registry_delegate_win.cc index ca814b2..6be3fd0 100644 --- a/remoting/host/pairing_registry_delegate_win.cc +++ b/remoting/host/pairing_registry_delegate_win.cc @@ -60,7 +60,7 @@ scoped_ptr<base::DictionaryValue> ReadValue(const base::win::RegKey& key, return nullptr; } - if (value->GetType() != base::Value::TYPE_DICTIONARY) { + if (!value->IsType(base::Value::TYPE_DICTIONARY)) { LOG(ERROR) << "Failed to parse '" << value_name << "': not a dictionary."; return nullptr; } diff --git a/remoting/host/setup/daemon_controller_delegate_win.cc b/remoting/host/setup/daemon_controller_delegate_win.cc index 8379ea7..34b50a6 100644 --- a/remoting/host/setup/daemon_controller_delegate_win.cc +++ b/remoting/host/setup/daemon_controller_delegate_win.cc @@ -188,7 +188,7 @@ scoped_ptr<base::DictionaryValue> DaemonControllerDelegateWin::GetConfig() { base::JSONReader::Read(base::UTF16ToUTF8(file_content), base::JSON_ALLOW_TRAILING_COMMAS)); - if (!config || config->GetType() != base::Value::TYPE_DICTIONARY) + if (!config || !config->IsType(base::Value::TYPE_DICTIONARY)) return nullptr; return scoped_ptr<base::DictionaryValue>( diff --git a/remoting/host/setup/me2me_native_messaging_host.cc b/remoting/host/setup/me2me_native_messaging_host.cc index 3d6cb3d..018f28c 100644 --- a/remoting/host/setup/me2me_native_messaging_host.cc +++ b/remoting/host/setup/me2me_native_messaging_host.cc @@ -104,7 +104,7 @@ void Me2MeNativeMessagingHost::Start( void Me2MeNativeMessagingHost::OnMessage(scoped_ptr<base::Value> message) { DCHECK(thread_checker_.CalledOnValidThread()); - if (message->GetType() != base::Value::TYPE_DICTIONARY) { + if (!message->IsType(base::Value::TYPE_DICTIONARY)) { LOG(ERROR) << "Received a message that's not a dictionary."; channel_->SendMessage(nullptr); return; diff --git a/remoting/host/token_validator_base.cc b/remoting/host/token_validator_base.cc index c370167..15f22bc 100644 --- a/remoting/host/token_validator_base.cc +++ b/remoting/host/token_validator_base.cc @@ -178,8 +178,7 @@ std::string TokenValidatorBase::ProcessResponse() { // Decode the JSON data from the response. scoped_ptr<base::Value> value(base::JSONReader::Read(data_)); base::DictionaryValue* dict; - if (!value.get() || value->GetType() != base::Value::TYPE_DICTIONARY || - !value->GetAsDictionary(&dict)) { + if (!value || !value->GetAsDictionary(&dict)) { LOG(ERROR) << "Invalid token validation response: '" << data_ << "'"; return std::string(); } |