Index: chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc |
diff --git a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc |
index a15d034d6c6bba504abefc7861491e96e72099ee..ab8c843b67ea8befc6b6ca046b934f09361e4a04 100644 |
--- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc |
+++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc |
@@ -36,8 +36,8 @@ TEST(WebRequestConditionAttributeTest, CreateConditionAttribute) { |
std::string error; |
scoped_refptr<const WebRequestConditionAttribute> result; |
- StringValue string_value("main_frame"); |
- ListValue resource_types; |
+ base::StringValue string_value("main_frame"); |
+ base::ListValue resource_types; |
resource_types.Append(new base::StringValue("main_frame")); |
// Test wrong condition name passed. |
@@ -76,7 +76,7 @@ TEST(WebRequestConditionAttributeTest, ResourceType) { |
base::MessageLoop message_loop(base::MessageLoop::TYPE_IO); |
std::string error; |
- ListValue resource_types; |
+ base::ListValue resource_types; |
// The 'sub_frame' value is chosen arbitrarily, so as the corresponding |
// ResourceType::Type is not 0, the default value. |
resource_types.Append(new base::StringValue("sub_frame")); |
@@ -127,7 +127,7 @@ TEST(WebRequestConditionAttributeTest, ContentType) { |
url_request.Start(); |
base::MessageLoop::current()->Run(); |
- ListValue content_types; |
+ base::ListValue content_types; |
content_types.Append(new base::StringValue("text/plain")); |
scoped_refptr<const WebRequestConditionAttribute> attribute_include = |
WebRequestConditionAttribute::Create( |
@@ -258,7 +258,7 @@ TEST(WebRequestConditionAttributeTest, Stages) { |
std::string error; |
// Create an attribute with an empty set of applicable stages. |
- ListValue empty_list; |
+ base::ListValue empty_list; |
scoped_refptr<const WebRequestConditionAttribute> empty_attribute = |
WebRequestConditionAttribute::Create(keys::kStagesKey, |
&empty_list, |
@@ -268,7 +268,7 @@ TEST(WebRequestConditionAttributeTest, Stages) { |
EXPECT_EQ(std::string(keys::kStagesKey), empty_attribute->GetName()); |
// Create an attribute with all possible applicable stages. |
- ListValue all_stages; |
+ base::ListValue all_stages; |
for (size_t i = 0; i < arraysize(active_stages); ++i) |
all_stages.AppendString(active_stages[i].second); |
scoped_refptr<const WebRequestConditionAttribute> attribute_with_all = |
@@ -284,7 +284,7 @@ TEST(WebRequestConditionAttributeTest, Stages) { |
one_stage_attributes; |
for (size_t i = 0; i < arraysize(active_stages); ++i) { |
- ListValue single_stage_list; |
+ base::ListValue single_stage_list; |
single_stage_list.AppendString(active_stages[i].second); |
one_stage_attributes.push_back( |
WebRequestConditionAttribute::Create(keys::kStagesKey, |
@@ -342,37 +342,38 @@ void GetArrayAsVector(const std::string array[], |
// Builds a DictionaryValue from an array of the form {name1, value1, name2, |
// value2, ...}. Values for the same key are grouped in a ListValue. |
-scoped_ptr<DictionaryValue> GetDictionaryFromArray( |
+scoped_ptr<base::DictionaryValue> GetDictionaryFromArray( |
const std::vector<const std::string*>& array) { |
const size_t length = array.size(); |
CHECK(length % 2 == 0); |
- scoped_ptr<DictionaryValue> dictionary(new DictionaryValue); |
+ scoped_ptr<base::DictionaryValue> dictionary(new base::DictionaryValue); |
for (size_t i = 0; i < length; i += 2) { |
const std::string* name = array[i]; |
const std::string* value = array[i+1]; |
if (dictionary->HasKey(*name)) { |
- Value* entry = NULL; |
- scoped_ptr<Value> entry_owned; |
- ListValue* list = NULL; |
+ base::Value* entry = NULL; |
+ scoped_ptr<base::Value> entry_owned; |
+ base::ListValue* list = NULL; |
if (!dictionary->GetWithoutPathExpansion(*name, &entry)) |
- return scoped_ptr<DictionaryValue>(); |
+ return scoped_ptr<base::DictionaryValue>(); |
switch (entry->GetType()) { |
- case Value::TYPE_STRING: // Replace the present string with a list. |
- list = new ListValue; |
+ case base::Value::TYPE_STRING: |
+ // Replace the present string with a list. |
+ list = new base::ListValue; |
// Ignoring return value, we already verified the entry is there. |
dictionary->RemoveWithoutPathExpansion(*name, &entry_owned); |
list->Append(entry_owned.release()); |
list->Append(new base::StringValue(*value)); |
dictionary->SetWithoutPathExpansion(*name, list); |
break; |
- case Value::TYPE_LIST: // Just append to the list. |
+ case base::Value::TYPE_LIST: // Just append to the list. |
CHECK(entry->GetAsList(&list)); |
list->Append(new base::StringValue(*value)); |
break; |
default: |
NOTREACHED(); // We never put other Values here. |
- return scoped_ptr<DictionaryValue>(); |
+ return scoped_ptr<base::DictionaryValue>(); |
} |
} else { |
dictionary->SetString(*name, *value); |
@@ -391,9 +392,9 @@ void MatchAndCheck(const std::vector< std::vector<const std::string*> >& tests, |
RequestStage stage, |
net::URLRequest* url_request, |
bool* result) { |
- ListValue contains_headers; |
+ base::ListValue contains_headers; |
for (size_t i = 0; i < tests.size(); ++i) { |
- scoped_ptr<DictionaryValue> temp(GetDictionaryFromArray(tests[i])); |
+ scoped_ptr<base::DictionaryValue> temp(GetDictionaryFromArray(tests[i])); |
ASSERT_TRUE(temp.get()); |
contains_headers.Append(temp.release()); |
} |