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

Unified Diff: chrome/browser/extensions/api/declarative_content/content_condition.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_content/content_condition.cc
diff --git a/chrome/browser/extensions/api/declarative_content/content_condition.cc b/chrome/browser/extensions/api/declarative_content/content_condition.cc
index df152af8a0c146bb4a6a01e4c12fb592e4aa395f..1d83093e1087b53f77621aa7b9090ddab40e8942 100644
--- a/chrome/browser/extensions/api/declarative_content/content_condition.cc
+++ b/chrome/browser/extensions/api/declarative_content/content_condition.cc
@@ -69,18 +69,18 @@ scoped_ptr<ContentCondition> ContentCondition::Create(
const base::DictionaryValue* condition_dict = NULL;
if (!condition.GetAsDictionary(&condition_dict)) {
*error = kExpectedDictionary;
- return scoped_ptr<ContentCondition>(NULL);
+ return scoped_ptr<ContentCondition>();
}
// Verify that we are dealing with a Condition whose type we understand.
std::string instance_type;
if (!condition_dict->GetString(keys::kInstanceType, &instance_type)) {
*error = kConditionWithoutInstanceType;
- return scoped_ptr<ContentCondition>(NULL);
+ return scoped_ptr<ContentCondition>();
}
if (instance_type != keys::kPageStateMatcherType) {
*error = kExpectedOtherConditionType;
- return scoped_ptr<ContentCondition>(NULL);
+ return scoped_ptr<ContentCondition>();
}
scoped_refptr<URLMatcherConditionSet> url_matcher_condition_set;
@@ -123,7 +123,7 @@ scoped_ptr<ContentCondition> ContentCondition::Create(
condition_attribute_name.c_str());
}
if (!error->empty())
- return scoped_ptr<ContentCondition>(NULL);
+ return scoped_ptr<ContentCondition>();
}
if (!url_matcher_condition_set.get()) {

Powered by Google App Engine
This is Rietveld 408576698