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

Unified Diff: extensions/browser/verified_contents.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/browser/verified_contents.cc
diff --git a/extensions/browser/verified_contents.cc b/extensions/browser/verified_contents.cc
index 47c94662a166ca18d999ef9a32992318d9b4e9ad..5c3142b572f50a8fc791697e8929fe9cc2a8fc4e 100644
--- a/extensions/browser/verified_contents.cc
+++ b/extensions/browser/verified_contents.cc
@@ -60,7 +60,7 @@ DictionaryValue* FindDictionaryWithValue(const ListValue* list,
if (dictionary->GetString(key, &found_value) && found_value == value)
return dictionary;
}
- return NULL;
+ return nullptr;
}
} // namespace
@@ -143,12 +143,12 @@ bool VerifiedContents::InitFrom(const base::FilePath& path,
if (!version_.IsValid())
return false;
- ListValue* hashes_list = NULL;
+ ListValue* hashes_list = nullptr;
if (!dictionary->GetList(kContentHashesKey, &hashes_list))
return false;
for (size_t i = 0; i < hashes_list->GetSize(); i++) {
- DictionaryValue* hashes = NULL;
+ DictionaryValue* hashes = nullptr;
if (!hashes_list->GetDictionary(i, &hashes))
return false;
std::string format;
@@ -167,12 +167,12 @@ bool VerifiedContents::InitFrom(const base::FilePath& path,
if (block_size_ != hash_block_size)
return false;
- ListValue* files = NULL;
+ ListValue* files = nullptr;
if (!hashes->GetList(kFilesKey, &files))
return false;
for (size_t j = 0; j < files->GetSize(); j++) {
- DictionaryValue* data = NULL;
+ DictionaryValue* data = nullptr;
if (!files->GetDictionary(j, &data))
return false;
std::string file_path_string;
@@ -200,7 +200,7 @@ const std::string* VerifiedContents::GetTreeHashRoot(
std::map<base::FilePath, std::string>::const_iterator i =
root_hashes_.find(relative_path.NormalizePathSeparatorsTo('/'));
if (i == root_hashes_.end())
- return NULL;
+ return nullptr;
return &i->second;
}
@@ -268,14 +268,14 @@ bool VerifiedContents::GetPayload(const base::FilePath& path,
// ]
DictionaryValue* dictionary =
FindDictionaryWithValue(top_list, kDescriptionKey, kTreeHashPerFile);
- DictionaryValue* signed_content = NULL;
+ DictionaryValue* signed_content = nullptr;
if (!dictionary ||
!dictionary->GetDictionaryWithoutPathExpansion(kSignedContentKey,
&signed_content)) {
return false;
}
- ListValue* signatures = NULL;
+ ListValue* signatures = nullptr;
if (!signed_content->GetList(kSignaturesKey, &signatures))
return false;

Powered by Google App Engine
This is Rietveld 408576698