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

Unified Diff: extensions/common/extension.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/common/extension.cc
diff --git a/extensions/common/extension.cc b/extensions/common/extension.cc
index d8e798e516e2795c50f670fd27a6b26e4a1ed6e9..815127f6d3bfcd43d4e1f4e07a3041d91eed0c5b 100644
--- a/extensions/common/extension.cc
+++ b/extensions/common/extension.cc
@@ -114,12 +114,12 @@ scoped_refptr<Extension> Extension::Create(const base::FilePath& path,
if (!InitExtensionID(manifest.get(), path, explicit_id, flags, &error)) {
*utf8_error = base::UTF16ToUTF8(error);
- return NULL;
+ return nullptr;
}
std::vector<InstallWarning> install_warnings;
if (!manifest->ValidateManifest(utf8_error, &install_warnings)) {
- return NULL;
+ return nullptr;
}
scoped_refptr<Extension> extension = new Extension(path, manifest.Pass());
@@ -127,7 +127,7 @@ scoped_refptr<Extension> Extension::Create(const base::FilePath& path,
if (!extension->InitFromValue(flags, &error)) {
*utf8_error = base::UTF16ToUTF8(error);
- return NULL;
+ return nullptr;
}
return extension;
@@ -363,7 +363,7 @@ Extension::ManifestData* Extension::GetManifestData(const std::string& key)
ManifestDataMap::const_iterator iter = manifest_data_.find(key);
if (iter != manifest_data_.end())
return iter->second.get();
- return NULL;
+ return nullptr;
}
void Extension::SetManifestData(const std::string& key,
@@ -600,11 +600,11 @@ bool Extension::LoadExtent(const char* key,
const char* list_error,
const char* value_error,
base::string16* error) {
- const base::Value* temp_pattern_value = NULL;
+ const base::Value* temp_pattern_value = nullptr;
if (!manifest_->Get(key, &temp_pattern_value))
return true;
- const base::ListValue* pattern_list = NULL;
+ const base::ListValue* pattern_list = nullptr;
if (!temp_pattern_value->GetAsList(&pattern_list)) {
*error = base::ASCIIToUTF16(list_error);
return false;

Powered by Google App Engine
This is Rietveld 408576698