Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / profile_resetter / jtl_interpreter.cc
index a4cbd16..c918954 100644 (file)
@@ -112,8 +112,8 @@ class NavigateOperation : public Operation {
  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.
@@ -142,8 +142,8 @@ class NavigateOperation : public Operation {
 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)) {
@@ -177,8 +177,8 @@ class NavigateAnyOperation : public Operation {
 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();
@@ -195,11 +195,11 @@ class StoreValue : public Operation {
   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();
   }
@@ -218,12 +218,12 @@ class CompareStoredValue : public Operation {
       : 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();
@@ -244,10 +244,10 @@ class StoreNodeValue : public Operation {
  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))
@@ -275,10 +275,10 @@ class StoreNodeRegisterableDomain : public Operation {
  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) ||
@@ -326,8 +326,8 @@ class StoreNodeRegisterableDomain : public Operation {
 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;
@@ -345,8 +345,8 @@ class CompareNodeHash : public Operation {
  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_)
@@ -363,8 +363,8 @@ class CompareNodeHashNot : public Operation {
  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_)
@@ -383,7 +383,7 @@ class CompareNodeToStored : public Operation {
   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;
@@ -417,8 +417,8 @@ class CompareNodeSubstring : public Operation {
         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_)
@@ -450,10 +450,8 @@ class CompareNodeSubstring : public Operation {
 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);
@@ -488,7 +486,7 @@ class Parser {
           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))
@@ -500,7 +498,7 @@ class Parser {
         }
         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))
@@ -517,7 +515,7 @@ class Parser {
         }
         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))
@@ -529,7 +527,7 @@ class Parser {
         }
         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))
@@ -546,21 +544,21 @@ class Parser {
         }
         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;
@@ -588,14 +586,14 @@ class Parser {
         }
         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;