diff options
Diffstat (limited to 'chrome/common/web_resource')
-rw-r--r-- | chrome/common/web_resource/web_resource_unpacker.cc | 4 | ||||
-rw-r--r-- | chrome/common/web_resource/web_resource_unpacker.h | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/chrome/common/web_resource/web_resource_unpacker.cc b/chrome/common/web_resource/web_resource_unpacker.cc index a821547..7f0ced4 100644 --- a/chrome/common/web_resource/web_resource_unpacker.cc +++ b/chrome/common/web_resource/web_resource_unpacker.cc @@ -25,11 +25,11 @@ bool WebResourceUnpacker::Run() { error_message_ = kInvalidDataTypeError; return false; } - if (!value->IsType(Value::TYPE_LIST)) { + if (!value->IsType(Value::TYPE_DICTIONARY)) { error_message_ = kUnexpectedJSONFormatError; return false; } - parsed_json_.reset(static_cast<ListValue*>(value.release())); + parsed_json_.reset(static_cast<DictionaryValue*>(value.release())); return true; } error_message_ = kInvalidDataTypeError; diff --git a/chrome/common/web_resource/web_resource_unpacker.h b/chrome/common/web_resource/web_resource_unpacker.h index 194e1c5..95600f9 100644 --- a/chrome/common/web_resource/web_resource_unpacker.h +++ b/chrome/common/web_resource/web_resource_unpacker.h @@ -17,7 +17,7 @@ #include "base/file_path.h" #include "base/scoped_ptr.h" -class ListValue; +class DictionaryValue; class WebResourceUnpacker { public: @@ -35,7 +35,7 @@ class WebResourceUnpacker { const std::string& error_message() { return error_message_; } // Gets data which has been parsed by Run(). - ListValue* parsed_json() { + DictionaryValue* parsed_json() { return parsed_json_.get(); } @@ -44,7 +44,7 @@ class WebResourceUnpacker { std::string resource_data_; // Holds the result of JSON parsing of resource_data_. - scoped_ptr<ListValue> parsed_json_; + scoped_ptr<DictionaryValue> parsed_json_; // Holds the last error message produced by Run(). std::string error_message_; |