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

Unified Diff: components/content_settings/core/browser/content_settings_rule.cc

Issue 2318223002: Remove EmptyRuleIterators with nullptrs. (Closed)
Patch Set: Fix failing unit test Created 4 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: components/content_settings/core/browser/content_settings_rule.cc
diff --git a/components/content_settings/core/browser/content_settings_rule.cc b/components/content_settings/core/browser/content_settings_rule.cc
index 540231337ee73f8ef0fab1ae021ea15dfc4cc6a2..13d6a0aeed951b2e9fbfbd97421fa25b67dfd21f 100644
--- a/components/content_settings/core/browser/content_settings_rule.cc
+++ b/components/content_settings/core/browser/content_settings_rule.cc
@@ -2,9 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/logging.h"
#include "components/content_settings/core/browser/content_settings_rule.h"
+#include <utility>
+
+#include "base/logging.h"
+
namespace content_settings {
Rule::Rule() {}
@@ -25,17 +28,6 @@ Rule::~Rule() {}
RuleIterator::~RuleIterator() {}
-EmptyRuleIterator::~EmptyRuleIterator() {}
-
-bool EmptyRuleIterator::HasNext() const {
- return false;
-}
-
-Rule EmptyRuleIterator::Next() {
- NOTREACHED();
- return Rule();
-}
-
ConcatenationIterator::ConcatenationIterator(
std::vector<std::unique_ptr<RuleIterator>> iterators,
base::AutoLock* auto_lock)
@@ -52,7 +44,7 @@ ConcatenationIterator::ConcatenationIterator(
ConcatenationIterator::~ConcatenationIterator() {}
bool ConcatenationIterator::HasNext() const {
- return (!iterators_.empty());
+ return !iterators_.empty();
}
Rule ConcatenationIterator::Next() {

Powered by Google App Engine
This is Rietveld 408576698