diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-07 22:41:51 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-07 22:41:51 +0000 |
commit | cf2ce2306a89387b1708eea172b2497e701a5bd8 (patch) | |
tree | 88330ca1ced83720a8b7a1c0ff6d5308d43555da /webkit | |
parent | 285d2cfa97175a67080cd8c6dbd0ed73a7181f0f (diff) | |
download | chromium_src-cf2ce2306a89387b1708eea172b2497e701a5bd8.zip chromium_src-cf2ce2306a89387b1708eea172b2497e701a5bd8.tar.gz chromium_src-cf2ce2306a89387b1708eea172b2497e701a5bd8.tar.bz2 |
Avoids the use of "namespace using-directives" in a few places.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/183008
Patch from tfarina.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25607 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/devtools/bound_object.cc | 6 | ||||
-rw-r--r-- | webkit/glue/glue_serialize_unittest.cc | 24 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_main.cc | 2 |
3 files changed, 12 insertions, 20 deletions
diff --git a/webkit/glue/devtools/bound_object.cc b/webkit/glue/devtools/bound_object.cc index bc8310c..3301bc2 100644 --- a/webkit/glue/devtools/bound_object.cc +++ b/webkit/glue/devtools/bound_object.cc @@ -9,8 +9,6 @@ #include "V8Proxy.h" #include "webkit/glue/devtools/bound_object.h" -using namespace WebCore; - BoundObject::BoundObject( v8::Handle<v8::Context> context, void* v8_this, @@ -22,7 +20,7 @@ BoundObject::BoundObject( v8_this_ = v8::Persistent<v8::External>::New(v8::External::New(v8_this)); v8::Local<v8::FunctionTemplate> local_template = - v8::FunctionTemplate::New(V8Proxy::checkNewLegal); + v8::FunctionTemplate::New(WebCore::V8Proxy::checkNewLegal); host_template_ = v8::Persistent<v8::FunctionTemplate>::New(local_template); host_template_->SetClassName(v8::String::New(object_name)); } @@ -54,7 +52,7 @@ void BoundObject::Build() { v8::Local<v8::Function> constructor = host_template_->GetFunction(); bound_object_ = v8::Persistent<v8::Object>::New( - SafeAllocation::newInstance(constructor)); + WebCore::SafeAllocation::newInstance(constructor)); v8::Handle<v8::Object> global = context_->Global(); global->Set(v8::String::New(object_name_), bound_object_); diff --git a/webkit/glue/glue_serialize_unittest.cc b/webkit/glue/glue_serialize_unittest.cc index 97912f2..94b8350 100644 --- a/webkit/glue/glue_serialize_unittest.cc +++ b/webkit/glue/glue_serialize_unittest.cc @@ -12,9 +12,6 @@ #include "webkit/api/public/WebVector.h" #include "webkit/glue/glue_serialize.h" -using namespace std; -using namespace webkit_glue; - using WebKit::WebData; using WebKit::WebHistoryItem; using WebKit::WebHTTPBody; @@ -113,8 +110,8 @@ class GlueSerializeTest : public testing::Test { b_body.elementAt(i, b_elem); ++i) { EXPECT_EQ(a_elem.type, b_elem.type); if (a_elem.type == WebHTTPBody::Element::TypeData) { - EXPECT_EQ(string(a_elem.data.data(), a_elem.data.size()), - string(b_elem.data.data(), b_elem.data.size())); + EXPECT_EQ(std::string(a_elem.data.data(), a_elem.data.size()), + std::string(b_elem.data.data(), b_elem.data.size())); } else { EXPECT_EQ(string16(a_elem.filePath), string16(b_elem.filePath)); } @@ -138,10 +135,10 @@ TEST_F(GlueSerializeTest, BackwardsCompatibleTest) { // Make sure version 3 (current version) can read versions 1 and 2. for (int i = 1; i <= 2; i++) { - string serialized_item; - HistoryItemToVersionedString(item, i, &serialized_item); + std::string serialized_item; + webkit_glue::HistoryItemToVersionedString(item, i, &serialized_item); const WebHistoryItem& deserialized_item = - HistoryItemFromString(serialized_item); + webkit_glue::HistoryItemFromString(serialized_item); ASSERT_FALSE(item.isNull()); ASSERT_FALSE(deserialized_item.isNull()); HistoryItemExpectEqual(item, deserialized_item); @@ -152,9 +149,9 @@ TEST_F(GlueSerializeTest, BackwardsCompatibleTest) { // deserialized. TEST_F(GlueSerializeTest, HistoryItemSerializeTest) { const WebHistoryItem& item = MakeHistoryItem(true, true); - const string& serialized_item = HistoryItemToString(item); + const std::string& serialized_item = webkit_glue::HistoryItemToString(item); const WebHistoryItem& deserialized_item = - HistoryItemFromString(serialized_item); + webkit_glue::HistoryItemFromString(serialized_item); ASSERT_FALSE(item.isNull()); ASSERT_FALSE(deserialized_item.isNull()); @@ -173,7 +170,7 @@ TEST_F(GlueSerializeTest, BadMessagesTest) { // Bad real number. p.WriteInt(-1); std::string s(static_cast<const char*>(p.data()), p.size()); - HistoryItemFromString(s); + webkit_glue::HistoryItemFromString(s); } { double d = 0; @@ -195,9 +192,8 @@ TEST_F(GlueSerializeTest, BadMessagesTest) { p.WriteInt(1); p.WriteInt(WebHTTPBody::Element::TypeData); std::string s(static_cast<const char*>(p.data()), p.size()); - HistoryItemFromString(s); + webkit_glue::HistoryItemFromString(s); } } - -} // namespace +} // namespace diff --git a/webkit/tools/test_shell/test_shell_main.cc b/webkit/tools/test_shell/test_shell_main.cc index dbd8ccb..6ef35df 100644 --- a/webkit/tools/test_shell/test_shell_main.cc +++ b/webkit/tools/test_shell/test_shell_main.cc @@ -39,8 +39,6 @@ #include "webkit/tools/test_shell/test_shell_switches.h" #include "webkit/tools/test_shell/test_shell_webkit_init.h" -using namespace std; - static const size_t kPathBufSize = 2048; namespace { |