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

Unified Diff: chrome/browser/extensions/api/declarative/declarative_rule.h

Issue 11827026: Overhaul JSON Schema Compiler to support a number of features required to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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/declarative_rule.h
diff --git a/chrome/browser/extensions/api/declarative/declarative_rule.h b/chrome/browser/extensions/api/declarative/declarative_rule.h
index 703ca3475e3e83bc84d85ab6275144b9fbd20bad..b2dbcd2eac1cc4af6e828195fc842a78b683c63a 100644
--- a/chrome/browser/extensions/api/declarative/declarative_rule.h
+++ b/chrome/browser/extensions/api/declarative/declarative_rule.h
@@ -20,6 +20,7 @@
namespace base {
class Time;
+class Value;
}
namespace extensions {
@@ -53,7 +54,7 @@ namespace extensions {
template<typename ConditionT>
class DeclarativeConditionSet {
public:
- typedef std::vector<linked_ptr<json_schema_compiler::any::Any> > AnyVector;
+ typedef std::vector<linked_ptr<base::Value> > AnyVector;
typedef std::vector<linked_ptr<const ConditionT> > Conditions;
typedef typename Conditions::const_iterator const_iterator;
@@ -147,7 +148,7 @@ class DeclarativeConditionSet {
template<typename ActionT>
class DeclarativeActionSet {
public:
- typedef std::vector<linked_ptr<json_schema_compiler::any::Any> > AnyVector;
+ typedef std::vector<linked_ptr<base::Value> > AnyVector;
typedef std::vector<linked_ptr<const ActionT> > Actions;
explicit DeclarativeActionSet(const Actions& actions);
@@ -307,8 +308,7 @@ DeclarativeConditionSet<ConditionT>::Create(
i != conditions.end(); ++i) {
CHECK(i->get());
scoped_ptr<ConditionT> condition =
- ConditionT::Create(url_matcher_condition_factory,
- (*i)->value(), error);
+ ConditionT::Create(url_matcher_condition_factory, **i, error);
if (!error->empty())
return scoped_ptr<DeclarativeConditionSet>(NULL);
result.push_back(make_linked_ptr(condition.release()));
@@ -367,8 +367,7 @@ DeclarativeActionSet<ActionT>::Create(
for (AnyVector::const_iterator i = actions.begin();
i != actions.end(); ++i) {
CHECK(i->get());
- scoped_ptr<ActionT> action =
- ActionT::Create((*i)->value(), error, bad_message);
+ scoped_ptr<ActionT> action = ActionT::Create(**i, error, bad_message);
if (!error->empty() || *bad_message)
return scoped_ptr<DeclarativeActionSet>(NULL);
result.push_back(make_linked_ptr(action.release()));

Powered by Google App Engine
This is Rietveld 408576698