Modernize to C++11 : NULL => nullptr
This commit is contained in:
parent
bf9d2b7fa9
commit
7474e5ec28
4 changed files with 8 additions and 8 deletions
|
@ -26,7 +26,7 @@ const content::MediaStreamDevice* FindDeviceWithId(
|
||||||
return &(*iter);
|
return &(*iter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
const MediaStreamDevices& EmptyDevices() {
|
const MediaStreamDevices& EmptyDevices() {
|
||||||
|
@ -100,7 +100,7 @@ MediaCaptureDevicesDispatcher::GetFirstAvailableAudioDevice() {
|
||||||
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
||||||
const content::MediaStreamDevices& audio_devices = GetAudioCaptureDevices();
|
const content::MediaStreamDevices& audio_devices = GetAudioCaptureDevices();
|
||||||
if (audio_devices.empty())
|
if (audio_devices.empty())
|
||||||
return NULL;
|
return nullptr;
|
||||||
return &(*audio_devices.begin());
|
return &(*audio_devices.begin());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ MediaCaptureDevicesDispatcher::GetFirstAvailableVideoDevice() {
|
||||||
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
||||||
const content::MediaStreamDevices& video_devices = GetVideoCaptureDevices();
|
const content::MediaStreamDevices& video_devices = GetVideoCaptureDevices();
|
||||||
if (video_devices.empty())
|
if (video_devices.empty())
|
||||||
return NULL;
|
return nullptr;
|
||||||
return &(*video_devices.begin());
|
return &(*video_devices.begin());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ void MediaStreamDevicesController::Accept() {
|
||||||
if (microphone_requested_ || webcam_requested_) {
|
if (microphone_requested_ || webcam_requested_) {
|
||||||
switch (request_.request_type) {
|
switch (request_.request_type) {
|
||||||
case content::MEDIA_OPEN_DEVICE_PEPPER_ONLY: {
|
case content::MEDIA_OPEN_DEVICE_PEPPER_ONLY: {
|
||||||
const content::MediaStreamDevice* device = NULL;
|
const content::MediaStreamDevice* device = nullptr;
|
||||||
// For open device request pick the desired device or fall back to the
|
// For open device request pick the desired device or fall back to the
|
||||||
// first available of the given type.
|
// first available of the given type.
|
||||||
if (request_.audio_type == content::MEDIA_DEVICE_AUDIO_CAPTURE) {
|
if (request_.audio_type == content::MEDIA_DEVICE_AUDIO_CAPTURE) {
|
||||||
|
|
|
@ -221,12 +221,12 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
|
||||||
auto cookie_config = content::CookieStoreConfig(
|
auto cookie_config = content::CookieStoreConfig(
|
||||||
base_path_.Append(FILE_PATH_LITERAL("Cookies")),
|
base_path_.Append(FILE_PATH_LITERAL("Cookies")),
|
||||||
content::CookieStoreConfig::EPHEMERAL_SESSION_COOKIES,
|
content::CookieStoreConfig::EPHEMERAL_SESSION_COOKIES,
|
||||||
NULL, NULL);
|
nullptr, nullptr);
|
||||||
cookie_store = content::CreateCookieStore(cookie_config);
|
cookie_store = content::CreateCookieStore(cookie_config);
|
||||||
}
|
}
|
||||||
storage_->set_cookie_store(std::move(cookie_store));
|
storage_->set_cookie_store(std::move(cookie_store));
|
||||||
storage_->set_channel_id_service(base::WrapUnique(
|
storage_->set_channel_id_service(base::WrapUnique(
|
||||||
new net::ChannelIDService(new net::DefaultChannelIDStore(NULL),
|
new net::ChannelIDService(new net::DefaultChannelIDStore(nullptr),
|
||||||
base::WorkerPool::GetTaskRunner(true))));
|
base::WorkerPool::GetTaskRunner(true))));
|
||||||
|
|
||||||
std::string accept_lang = l10n_util::GetApplicationLocale("");
|
std::string accept_lang = l10n_util::GetApplicationLocale("");
|
||||||
|
@ -270,7 +270,7 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
|
||||||
new net::ProxyScriptFetcherImpl(url_request_context_.get()),
|
new net::ProxyScriptFetcherImpl(url_request_context_.get()),
|
||||||
dhcp_factory.Create(url_request_context_.get()),
|
dhcp_factory.Create(url_request_context_.get()),
|
||||||
host_resolver.get(),
|
host_resolver.get(),
|
||||||
NULL,
|
nullptr,
|
||||||
url_request_context_->network_delegate()));
|
url_request_context_->network_delegate()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ content::WebUIController* WebUIControllerFactory::CreateWebUIControllerForURL(
|
||||||
auto browser_context = web_ui->GetWebContents()->GetBrowserContext();
|
auto browser_context = web_ui->GetWebContents()->GetBrowserContext();
|
||||||
return new DevToolsUI(browser_context, web_ui);
|
return new DevToolsUI(browser_context, web_ui);
|
||||||
}
|
}
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace brightray
|
} // namespace brightray
|
||||||
|
|
Loading…
Reference in a new issue