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

Unified Diff: chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc

Issue 16703018: Rewrite scoped_ptr<T>(NULL) to use the default ctor in chrome/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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: chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc
diff --git a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc
index d810c6a30862a849241e0dd227d19ff38952b3a1..45ff85fe36e8a4eab4ef0ab6ea683a2f3b8302c3 100644
--- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc
+++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc
@@ -379,12 +379,12 @@ scoped_ptr<const HeaderMatcher> HeaderMatcher::Create(
it != tests->end(); ++it) {
const DictionaryValue* tests = NULL;
if (!(*it)->GetAsDictionary(&tests))
- return scoped_ptr<const HeaderMatcher>(NULL);
+ return scoped_ptr<const HeaderMatcher>();
scoped_ptr<const HeaderMatchTest> header_test(
HeaderMatchTest::Create(tests));
if (header_test.get() == NULL)
- return scoped_ptr<const HeaderMatcher>(NULL);
+ return scoped_ptr<const HeaderMatcher>();
header_tests.push_back(header_test.release());
}
@@ -489,7 +489,7 @@ HeaderMatcher::HeaderMatchTest::Create(const base::DictionaryValue* tests) {
match_type = StringMatchTest::kEquals;
} else {
NOTREACHED(); // JSON schema type checking should prevent this.
- return scoped_ptr<const HeaderMatchTest>(NULL);
+ return scoped_ptr<const HeaderMatchTest>();
}
const Value* content = &it.value();
@@ -513,7 +513,7 @@ HeaderMatcher::HeaderMatchTest::Create(const base::DictionaryValue* tests) {
}
default: {
NOTREACHED(); // JSON schema type checking should prevent this.
- return scoped_ptr<const HeaderMatchTest>(NULL);
+ return scoped_ptr<const HeaderMatchTest>();
}
}
}
@@ -560,7 +560,7 @@ scoped_ptr<const HeaderMatcher> PrepareHeaderMatcher(
const ListValue* value_as_list = NULL;
if (!value->GetAsList(&value_as_list)) {
*error = ErrorUtils::FormatErrorMessage(kInvalidValue, name);
- return scoped_ptr<const HeaderMatcher>(NULL);
+ return scoped_ptr<const HeaderMatcher>();
}
scoped_ptr<const HeaderMatcher> header_matcher(

Powered by Google App Engine
This is Rietveld 408576698