Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Unified Diff: extensions/renderer/script_context.cc

Issue 598173003: Run clang-modernize -use-nullptr over src/extensions/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/renderer/script_context.cc
diff --git a/extensions/renderer/script_context.cc b/extensions/renderer/script_context.cc
index 0eb4222f711b93b95694d35bcf8a3d503730498e..64d8753bb4ad101f779a691de64d129b3dc5ae8c 100644
--- a/extensions/renderer/script_context.cc
+++ b/extensions/renderer/script_context.cc
@@ -94,7 +94,7 @@ void ScriptContext::Invalidate() {
return;
if (module_system_)
module_system_->Invalidate();
- web_frame_ = NULL;
+ web_frame_ = nullptr;
v8_context_.reset();
}
@@ -105,13 +105,13 @@ const std::string& ScriptContext::GetExtensionID() const {
content::RenderView* ScriptContext::GetRenderView() const {
if (web_frame_ && web_frame_->view())
return content::RenderView::FromWebView(web_frame_->view());
- return NULL;
+ return nullptr;
}
content::RenderFrame* ScriptContext::GetRenderFrame() const {
if (web_frame_)
return content::RenderFrame::FromWebFrame(web_frame_);
- return NULL;
+ return nullptr;
}
v8::Local<v8::Value> ScriptContext::CallFunction(
@@ -144,7 +144,7 @@ Feature::Availability ScriptContext::GetAvailability(
const Extension* extension = extension_.get();
if (extension && extension->is_hosted_app() &&
(api_name == "runtime.connect" || api_name == "runtime.sendMessage")) {
- extension = NULL;
+ extension = nullptr;
}
return ExtensionAPI::GetSharedInstance()->IsAvailable(
api_name, extension, context_type_, GetURL());
@@ -216,7 +216,7 @@ GURL ScriptContext::GetEffectiveDocumentURL(const blink::WebFrame* frame,
const blink::WebFrame* parent = frame;
do {
parent = parent->parent() ? parent->parent() : parent->opener();
- } while (parent != NULL && !parent->document().isNull() &&
+ } while (parent != nullptr && !parent->document().isNull() &&
GURL(parent->document().url()).SchemeIs(url::kAboutScheme));
if (parent && !parent->document().isNull()) {

Powered by Google App Engine
This is Rietveld 408576698