public:
explicit NavigateOperation(const std::string& hashed_key)
: hashed_key_(hashed_key) {}
- virtual ~NavigateOperation() {}
- virtual bool Execute(ExecutionContext* context) OVERRIDE {
+ ~NavigateOperation() override {}
+ bool Execute(ExecutionContext* context) override {
const base::DictionaryValue* dict = NULL;
if (!context->current_node()->GetAsDictionary(&dict)) {
// Just ignore this node gracefully as this navigation is a dead end.
class NavigateAnyOperation : public Operation {
public:
NavigateAnyOperation() {}
- virtual ~NavigateAnyOperation() {}
- virtual bool Execute(ExecutionContext* context) OVERRIDE {
+ ~NavigateAnyOperation() override {}
+ bool Execute(ExecutionContext* context) override {
const base::DictionaryValue* dict = NULL;
const base::ListValue* list = NULL;
if (context->current_node()->GetAsDictionary(&dict)) {
class NavigateBackOperation : public Operation {
public:
NavigateBackOperation() {}
- virtual ~NavigateBackOperation() {}
- virtual bool Execute(ExecutionContext* context) OVERRIDE {
+ ~NavigateBackOperation() override {}
+ bool Execute(ExecutionContext* context) override {
const base::Value* current_node = context->current_node();
context->stack()->pop_back();
bool continue_traversal = context->ContinueExecution();
StoreValue(const std::string& hashed_name, scoped_ptr<base::Value> value)
: hashed_name_(hashed_name),
value_(value.Pass()) {
- DCHECK(IsStringUTF8(hashed_name));
+ DCHECK(base::IsStringUTF8(hashed_name));
DCHECK(value_);
}
- virtual ~StoreValue() {}
- virtual bool Execute(ExecutionContext* context) OVERRIDE {
+ ~StoreValue() override {}
+ bool Execute(ExecutionContext* context) override {
context->working_memory()->Set(hashed_name_, value_->DeepCopy());
return context->ContinueExecution();
}
: hashed_name_(hashed_name),
value_(value.Pass()),
default_value_(default_value.Pass()) {
- DCHECK(IsStringUTF8(hashed_name));
+ DCHECK(base::IsStringUTF8(hashed_name));
DCHECK(value_);
DCHECK(default_value_);
}
- virtual ~CompareStoredValue() {}
- virtual bool Execute(ExecutionContext* context) OVERRIDE {
+ ~CompareStoredValue() override {}
+ bool Execute(ExecutionContext* context) override {
const base::Value* actual_value = NULL;
if (!context->working_memory()->Get(hashed_name_, &actual_value))
actual_value = default_value_.get();
public:
explicit StoreNodeValue(const std::string& hashed_name)
: hashed_name_(hashed_name) {
- DCHECK(IsStringUTF8(hashed_name));
+ DCHECK(base::IsStringUTF8(hashed_name));
}
virtual ~StoreNodeValue() {}
- virtual bool Execute(ExecutionContext* context) OVERRIDE {
+ virtual bool Execute(ExecutionContext* context) override {
scoped_ptr<base::Value> value;
if (ExpectedTypeIsBooleanNotHashable) {
if (!context->current_node()->IsType(base::Value::TYPE_BOOLEAN))
public:
explicit StoreNodeRegisterableDomain(const std::string& hashed_name)
: hashed_name_(hashed_name) {
- DCHECK(IsStringUTF8(hashed_name));
+ DCHECK(base::IsStringUTF8(hashed_name));
}
- virtual ~StoreNodeRegisterableDomain() {}
- virtual bool Execute(ExecutionContext* context) OVERRIDE {
+ ~StoreNodeRegisterableDomain() override {}
+ bool Execute(ExecutionContext* context) override {
std::string possibly_invalid_url;
std::string domain;
if (!context->current_node()->GetAsString(&possibly_invalid_url) ||
class CompareNodeBool : public Operation {
public:
explicit CompareNodeBool(bool value) : value_(value) {}
- virtual ~CompareNodeBool() {}
- virtual bool Execute(ExecutionContext* context) OVERRIDE {
+ ~CompareNodeBool() override {}
+ bool Execute(ExecutionContext* context) override {
bool actual_value = false;
if (!context->current_node()->GetAsBoolean(&actual_value))
return true;
public:
explicit CompareNodeHash(const std::string& hashed_value)
: hashed_value_(hashed_value) {}
- virtual ~CompareNodeHash() {}
- virtual bool Execute(ExecutionContext* context) OVERRIDE {
+ ~CompareNodeHash() override {}
+ bool Execute(ExecutionContext* context) override {
std::string actual_hash;
if (!context->GetValueHash(*context->current_node(), &actual_hash) ||
actual_hash != hashed_value_)
public:
explicit CompareNodeHashNot(const std::string& hashed_value)
: hashed_value_(hashed_value) {}
- virtual ~CompareNodeHashNot() {}
- virtual bool Execute(ExecutionContext* context) OVERRIDE {
+ ~CompareNodeHashNot() override {}
+ bool Execute(ExecutionContext* context) override {
std::string actual_hash;
if (context->GetValueHash(*context->current_node(), &actual_hash) &&
actual_hash == hashed_value_)
explicit CompareNodeToStored(const std::string& hashed_name)
: hashed_name_(hashed_name) {}
virtual ~CompareNodeToStored() {}
- virtual bool Execute(ExecutionContext* context) OVERRIDE {
+ virtual bool Execute(ExecutionContext* context) override {
const base::Value* stored_value = NULL;
if (!context->working_memory()->Get(hashed_name_, &stored_value))
return true;
pattern_sum_(pattern_sum) {
DCHECK(pattern_length_);
}
- virtual ~CompareNodeSubstring() {}
- virtual bool Execute(ExecutionContext* context) OVERRIDE {
+ ~CompareNodeSubstring() override {}
+ bool Execute(ExecutionContext* context) override {
std::string value_as_string;
if (!context->current_node()->GetAsString(&value_as_string) ||
!pattern_length_ || value_as_string.size() < pattern_length_)
class StopExecutingSentenceOperation : public Operation {
public:
StopExecutingSentenceOperation() {}
- virtual ~StopExecutingSentenceOperation() {}
- virtual bool Execute(ExecutionContext* context) OVERRIDE {
- return false;
- }
+ ~StopExecutingSentenceOperation() override {}
+ bool Execute(ExecutionContext* context) override { return false; }
private:
DISALLOW_COPY_AND_ASSIGN(StopExecutingSentenceOperation);
break;
case jtl_foundation::STORE_BOOL: {
std::string hashed_name;
- if (!ReadHash(&hashed_name) || !IsStringUTF8(hashed_name))
+ if (!ReadHash(&hashed_name) || !base::IsStringUTF8(hashed_name))
return false;
bool value = false;
if (!ReadBool(&value))
}
case jtl_foundation::COMPARE_STORED_BOOL: {
std::string hashed_name;
- if (!ReadHash(&hashed_name) || !IsStringUTF8(hashed_name))
+ if (!ReadHash(&hashed_name) || !base::IsStringUTF8(hashed_name))
return false;
bool value = false;
if (!ReadBool(&value))
}
case jtl_foundation::STORE_HASH: {
std::string hashed_name;
- if (!ReadHash(&hashed_name) || !IsStringUTF8(hashed_name))
+ if (!ReadHash(&hashed_name) || !base::IsStringUTF8(hashed_name))
return false;
std::string hashed_value;
if (!ReadHash(&hashed_value))
}
case jtl_foundation::COMPARE_STORED_HASH: {
std::string hashed_name;
- if (!ReadHash(&hashed_name) || !IsStringUTF8(hashed_name))
+ if (!ReadHash(&hashed_name) || !base::IsStringUTF8(hashed_name))
return false;
std::string hashed_value;
if (!ReadHash(&hashed_value))
}
case jtl_foundation::STORE_NODE_BOOL: {
std::string hashed_name;
- if (!ReadHash(&hashed_name) || !IsStringUTF8(hashed_name))
+ if (!ReadHash(&hashed_name) || !base::IsStringUTF8(hashed_name))
return false;
operators.push_back(new StoreNodeValue<true>(hashed_name));
break;
}
case jtl_foundation::STORE_NODE_HASH: {
std::string hashed_name;
- if (!ReadHash(&hashed_name) || !IsStringUTF8(hashed_name))
+ if (!ReadHash(&hashed_name) || !base::IsStringUTF8(hashed_name))
return false;
operators.push_back(new StoreNodeValue<false>(hashed_name));
break;
}
case jtl_foundation::STORE_NODE_REGISTERABLE_DOMAIN_HASH: {
std::string hashed_name;
- if (!ReadHash(&hashed_name) || !IsStringUTF8(hashed_name))
+ if (!ReadHash(&hashed_name) || !base::IsStringUTF8(hashed_name))
return false;
operators.push_back(new StoreNodeRegisterableDomain(hashed_name));
break;
}
case jtl_foundation::COMPARE_NODE_TO_STORED_BOOL: {
std::string hashed_name;
- if (!ReadHash(&hashed_name) || !IsStringUTF8(hashed_name))
+ if (!ReadHash(&hashed_name) || !base::IsStringUTF8(hashed_name))
return false;
operators.push_back(new CompareNodeToStored<true>(hashed_name));
break;
}
case jtl_foundation::COMPARE_NODE_TO_STORED_HASH: {
std::string hashed_name;
- if (!ReadHash(&hashed_name) || !IsStringUTF8(hashed_name))
+ if (!ReadHash(&hashed_name) || !base::IsStringUTF8(hashed_name))
return false;
operators.push_back(new CompareNodeToStored<false>(hashed_name));
break;