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

Unified Diff: chrome/browser/content_settings/content_settings_rule.cc

Issue 579673003: Move content_settings_observer.h, content_settings_provider.h, content_settings_rule.* to the compo… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: last comment 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: chrome/browser/content_settings/content_settings_rule.cc
diff --git a/chrome/browser/content_settings/content_settings_rule.cc b/chrome/browser/content_settings/content_settings_rule.cc
deleted file mode 100644
index 2e5257579c3ffe7debc9dd7e40d7739c11d5de29..0000000000000000000000000000000000000000
--- a/chrome/browser/content_settings/content_settings_rule.cc
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// 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 "chrome/browser/content_settings/content_settings_rule.h"
-
-namespace content_settings {
-
-Rule::Rule() {}
-
-Rule::Rule(
- const ContentSettingsPattern& primary_pattern,
- const ContentSettingsPattern& secondary_pattern,
- base::Value* value)
- : primary_pattern(primary_pattern),
- secondary_pattern(secondary_pattern),
- value(value) {
- DCHECK(value);
-}
-
-Rule::~Rule() {}
-
-RuleIterator::~RuleIterator() {}
-
-EmptyRuleIterator::~EmptyRuleIterator() {}
-
-bool EmptyRuleIterator::HasNext() const {
- return false;
-}
-
-Rule EmptyRuleIterator::Next() {
- NOTREACHED();
- return Rule();
-}
-
-ConcatenationIterator::ConcatenationIterator(
- ScopedVector<RuleIterator>* iterators,
- base::AutoLock* auto_lock)
- : auto_lock_(auto_lock) {
- iterators_.swap(*iterators);
-
- ScopedVector<RuleIterator>::iterator it = iterators_.begin();
- while (it != iterators_.end()) {
- if (!(*it)->HasNext())
- it = iterators_.erase(it);
- else
- ++it;
- }
-}
-
-ConcatenationIterator::~ConcatenationIterator() {}
-
-bool ConcatenationIterator::HasNext() const {
- return (!iterators_.empty());
-}
-
-Rule ConcatenationIterator::Next() {
- ScopedVector<RuleIterator>::iterator current_iterator =
- iterators_.begin();
- DCHECK(current_iterator != iterators_.end());
- DCHECK((*current_iterator)->HasNext());
- const Rule& to_return = (*current_iterator)->Next();
- if (!(*current_iterator)->HasNext())
- iterators_.erase(current_iterator);
- return to_return;
-}
-
-} // namespace content_settings

Powered by Google App Engine
This is Rietveld 408576698