Commit 6ea9bf60 authored by Simon Zünd's avatar Simon Zünd Committed by Commit Bot

[cleanup] Use for..of and nullptr in devtools ui bindings

R=yangguo@chromium.org

Change-Id: I6930da9f938db2f3bfe4c5062dce30fc4847f3a6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2401037
Auto-Submit: Simon Zünd <szuend@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: default avatarYang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#805691}
parent 6d189bdd
......@@ -171,7 +171,7 @@ Browser* FindBrowser(content::WebContents* web_contents) {
if (tab_index != TabStripModel::kNoTab)
return browser;
}
return NULL;
return nullptr;
}
// DevToolsUIDefaultDelegate --------------------------------------------------
......@@ -658,14 +658,14 @@ void DevToolsUIBindings::FrontendWebContentsObserver::DidFinishNavigation(
DevToolsUIBindings* DevToolsUIBindings::ForWebContents(
content::WebContents* web_contents) {
if (!g_devtools_ui_bindings_instances.IsCreated())
return NULL;
return nullptr;
DevToolsUIBindingsList* instances =
g_devtools_ui_bindings_instances.Pointer();
for (auto it(instances->begin()); it != instances->end(); ++it) {
if ((*it)->web_contents() == web_contents)
return *it;
for (DevToolsUIBindings* binding : *instances) {
if (binding->web_contents() == web_contents)
return binding;
}
return NULL;
return nullptr;
}
DevToolsUIBindings::DevToolsUIBindings(content::WebContents* web_contents)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment