Commit b59ea313 authored by tfarina@chromium.org's avatar tfarina@chromium.org

base: Remove using declaration of BinaryValue as it's no longer necessary.

BUG=None
TEST=None

R=evan@chromium.org

Review URL: http://codereview.chromium.org/7550026

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95638 0039d316-1c4b-4281-b951-d872f2087c98
parent 120a314d
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include "base/base_export.h" #include "base/base_export.h"
#include "base/basictypes.h" #include "base/basictypes.h"
#include "base/string16.h" #include "base/string16.h"
#include "build/build_config.h"
// This file declares "using base::Value", etc. at the bottom, so that // This file declares "using base::Value", etc. at the bottom, so that
// current code can use these classes without the base namespace. In // current code can use these classes without the base namespace. In
...@@ -49,9 +48,9 @@ class Value; ...@@ -49,9 +48,9 @@ class Value;
typedef std::vector<Value*> ValueVector; typedef std::vector<Value*> ValueVector;
typedef std::map<std::string, Value*> ValueMap; typedef std::map<std::string, Value*> ValueMap;
// The Value class is the base class for Values. A Value can be // The Value class is the base class for Values. A Value can be instantiated
// instantiated via the Create*Value() factory methods, or by directly // via the Create*Value() factory methods, or by directly creating instances of
// creating instances of the subclasses. // the subclasses.
class BASE_EXPORT Value { class BASE_EXPORT Value {
public: public:
enum ValueType { enum ValueType {
...@@ -465,7 +464,6 @@ class BASE_EXPORT ValueSerializer { ...@@ -465,7 +464,6 @@ class BASE_EXPORT ValueSerializer {
} // namespace base } // namespace base
// http://crbug.com/88666 // http://crbug.com/88666
using base::BinaryValue;
using base::DictionaryValue; using base::DictionaryValue;
using base::FundamentalValue; using base::FundamentalValue;
using base::ListValue; using base::ListValue;
......
...@@ -123,7 +123,7 @@ bool AppNotifyFunction::RunImpl() { ...@@ -123,7 +123,7 @@ bool AppNotifyFunction::RunImpl() {
} }
if (details->HasKey(kIconDataKey)) { if (details->HasKey(kIconDataKey)) {
BinaryValue* binary = NULL; base::BinaryValue* binary = NULL;
EXTENSION_FUNCTION_VALIDATE(details->GetBinary(kIconDataKey, &binary)); EXTENSION_FUNCTION_VALIDATE(details->GetBinary(kIconDataKey, &binary));
IPC::Message bitmap_pickle(binary->GetBuffer(), binary->GetSize()); IPC::Message bitmap_pickle(binary->GetBuffer(), binary->GetSize());
void* iter = NULL; void* iter = NULL;
......
...@@ -46,7 +46,7 @@ bool BrowserActionFunction::RunImpl() { ...@@ -46,7 +46,7 @@ bool BrowserActionFunction::RunImpl() {
} }
bool BrowserActionSetIconFunction::RunBrowserAction() { bool BrowserActionSetIconFunction::RunBrowserAction() {
BinaryValue* binary = NULL; base::BinaryValue* binary = NULL;
EXTENSION_FUNCTION_VALIDATE(details_->GetBinary("imageData", &binary)); EXTENSION_FUNCTION_VALIDATE(details_->GetBinary("imageData", &binary));
IPC::Message bitmap_pickle(binary->GetBuffer(), binary->GetSize()); IPC::Message bitmap_pickle(binary->GetBuffer(), binary->GetSize());
void* iter = NULL; void* iter = NULL;
......
...@@ -155,7 +155,7 @@ bool PageActionSetIconFunction::RunImpl() { ...@@ -155,7 +155,7 @@ bool PageActionSetIconFunction::RunImpl() {
// setIcon can take a variant argument: either a canvas ImageData, or an // setIcon can take a variant argument: either a canvas ImageData, or an
// icon index. // icon index.
BinaryValue* binary; base::BinaryValue* binary;
int icon_index; int icon_index;
if (args->GetBinary("imageData", &binary)) { if (args->GetBinary("imageData", &binary)) {
IPC::Message bitmap_pickle(binary->GetBuffer(), binary->GetSize()); IPC::Message bitmap_pickle(binary->GetBuffer(), binary->GetSize());
......
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
...@@ -229,7 +229,7 @@ bool SetBadgeTextSidebarFunction::RunImpl(TabContents* tab, ...@@ -229,7 +229,7 @@ bool SetBadgeTextSidebarFunction::RunImpl(TabContents* tab,
bool SetIconSidebarFunction::RunImpl(TabContents* tab, bool SetIconSidebarFunction::RunImpl(TabContents* tab,
const std::string& content_id, const std::string& content_id,
const DictionaryValue& details) { const DictionaryValue& details) {
BinaryValue* binary; base::BinaryValue* binary;
EXTENSION_FUNCTION_VALIDATE(details.GetBinary(kImageDataKey, &binary)); EXTENSION_FUNCTION_VALIDATE(details.GetBinary(kImageDataKey, &binary));
IPC::Message bitmap_pickle(binary->GetBuffer(), binary->GetSize()); IPC::Message bitmap_pickle(binary->GetBuffer(), binary->GetSize());
void* iter = NULL; void* iter = NULL;
......
...@@ -201,7 +201,8 @@ Value* UserPolicyCache::DecodeValue(const em::GenericValue& value) const { ...@@ -201,7 +201,8 @@ Value* UserPolicyCache::DecodeValue(const em::GenericValue& value) const {
case em::GenericValue::VALUE_TYPE_BYTES: case em::GenericValue::VALUE_TYPE_BYTES:
if (value.has_bytes_value()) { if (value.has_bytes_value()) {
std::string bytes = value.bytes_value(); std::string bytes = value.bytes_value();
return BinaryValue::CreateWithCopiedBuffer(bytes.c_str(), bytes.size()); return base::BinaryValue::CreateWithCopiedBuffer(bytes.c_str(),
bytes.size());
} }
return NULL; return NULL;
case em::GenericValue::VALUE_TYPE_BOOL_ARRAY: { case em::GenericValue::VALUE_TYPE_BOOL_ARRAY: {
......
...@@ -515,7 +515,7 @@ class ExtensionImpl : public ExtensionBase { ...@@ -515,7 +515,7 @@ class ExtensionImpl : public ExtensionBase {
// Construct the Value object. // Construct the Value object.
IPC::Message bitmap_pickle; IPC::Message bitmap_pickle;
IPC::WriteParam(&bitmap_pickle, bitmap); IPC::WriteParam(&bitmap_pickle, bitmap);
*bitmap_value = BinaryValue::CreateWithCopiedBuffer( *bitmap_value = base::BinaryValue::CreateWithCopiedBuffer(
static_cast<const char*>(bitmap_pickle.data()), bitmap_pickle.size()); static_cast<const char*>(bitmap_pickle.data()), bitmap_pickle.size());
return true; return true;
......
...@@ -62,7 +62,8 @@ static void WriteValue(Message* m, const Value* value, int recursion) { ...@@ -62,7 +62,8 @@ static void WriteValue(Message* m, const Value* value, int recursion) {
break; break;
} }
case Value::TYPE_BINARY: { case Value::TYPE_BINARY: {
const BinaryValue* binary = static_cast<const BinaryValue*>(value); const base::BinaryValue* binary =
static_cast<const base::BinaryValue*>(value);
m->WriteData(binary->GetBuffer(), static_cast<int>(binary->GetSize())); m->WriteData(binary->GetBuffer(), static_cast<int>(binary->GetSize()));
break; break;
} }
...@@ -185,7 +186,7 @@ static bool ReadValue(const Message* m, void** iter, Value** value, ...@@ -185,7 +186,7 @@ static bool ReadValue(const Message* m, void** iter, Value** value,
int length; int length;
if (!m->ReadData(iter, &data, &length)) if (!m->ReadData(iter, &data, &length))
return false; return false;
*value = BinaryValue::CreateWithCopiedBuffer(data, length); *value = base::BinaryValue::CreateWithCopiedBuffer(data, length);
break; break;
} }
case Value::TYPE_DICTIONARY: { case Value::TYPE_DICTIONARY: {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment