// Configure and start the Daemon Controller if it is installed already.
HRESULT hr = ActivateController();
if (FAILED(hr))
- return scoped_ptr<base::DictionaryValue>();
+ return nullptr;
// Get the host configuration.
ScopedBstr host_config;
hr = control_->GetConfig(host_config.Receive());
if (FAILED(hr))
- return scoped_ptr<base::DictionaryValue>();
+ return nullptr;
// Parse the string into a dictionary.
base::string16 file_content(
base::JSONReader::Read(base::UTF16ToUTF8(file_content),
base::JSON_ALLOW_TRAILING_COMMAS));
- if (!config || config->GetType() != base::Value::TYPE_DICTIONARY)
- return scoped_ptr<base::DictionaryValue>();
+ if (!config || !config->IsType(base::Value::TYPE_DICTIONARY))
+ return nullptr;
- return scoped_ptr<base::DictionaryValue>(
- static_cast<base::DictionaryValue*>(config.release()));
+ return make_scoped_ptr(static_cast<base::DictionaryValue*>(config.release()));
}
void DaemonControllerDelegateWin::InstallHost(